mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca778a8958 | ||
|
|
063ef32785 | ||
|
|
cf4ead42cf | ||
|
|
a87aabc7d3 | ||
|
|
f3f15ab21a | ||
|
|
25223cfb6f | ||
|
|
280531a9fc | ||
|
|
e5016b784a | ||
|
|
b999b9c67c | ||
|
|
faa5b3692a | ||
|
|
36461d0ab0 | ||
|
|
8252333926 | ||
|
|
099a67d228 | ||
|
|
43c5c6b1ac | ||
|
|
9597512c71 | ||
|
|
73e0b719d5 | ||
|
|
c61c1b8de1 | ||
|
|
592a5f901c | ||
|
|
a6190d8168 | ||
|
|
4cae49d0d9 | ||
|
|
f372a49b3e | ||
|
|
51ce3b1892 | ||
|
|
9c50665d6f | ||
|
|
9e37d3b01a | ||
|
|
6cae23ae31 | ||
|
|
457dd7cee7 | ||
|
|
a9415cb366 | ||
|
|
5be324df23 | ||
|
|
a1a353b511 | ||
|
|
fe4c24cb25 | ||
|
|
f8501dbee9 | ||
|
|
4c65b83dbd | ||
|
|
c95f392f8b | ||
|
|
44841d2f44 | ||
|
|
cade7da1b9 | ||
|
|
cc71790043 | ||
|
|
66f7c6884d | ||
|
|
1ea8796f32 | ||
|
|
c430d562ae | ||
|
|
4f2a5ccc1a | ||
|
|
5c878a092c | ||
|
|
66041020ec | ||
|
|
ae9689e23b | ||
|
|
b9d124d6ec | ||
|
|
57abfde175 | ||
|
|
0748c2b8d0 | ||
|
|
218b7b7e4f | ||
|
|
eeab2e055c | ||
|
|
ef1c63f5a8 | ||
|
|
6395095ed3 | ||
|
|
caea1b6e73 | ||
|
|
d884bcb3bb | ||
|
|
c87105386b | ||
|
|
55f995e669 | ||
|
|
176de7b07f | ||
|
|
2d9994d5a0 | ||
|
|
904af520af | ||
|
|
cf9e881c47 | ||
|
|
204ed499c5 | ||
|
|
11b93b6cd9 | ||
|
|
9fc341b934 | ||
|
|
ce51de08fb | ||
|
|
9f7ec86a98 | ||
|
|
58816ece55 | ||
|
|
c36c8dd2b1 | ||
|
|
b7de47b0cf | ||
|
|
fae545d00c | ||
|
|
1d0ac15ee2 | ||
|
|
105322ae9f | ||
|
|
6d29503b13 | ||
|
|
b9552b75f0 | ||
|
|
8b547d3826 | ||
|
|
8e9965bda4 | ||
|
|
a3e9b0340e | ||
|
|
c3a1f679c7 | ||
|
|
5abd707fd3 | ||
|
|
721de0a91e | ||
|
|
ed57e41044 | ||
|
|
a8f3f98e8a | ||
|
|
8a58de90bf | ||
|
|
4d915a4471 | ||
|
|
e6daa55141 | ||
|
|
d329f3b8b0 | ||
|
|
8a83208ae3 | ||
|
|
33ef37ebdd | ||
|
|
feb0530f59 | ||
|
|
1ebe41f9bf | ||
|
|
d7bfce6071 | ||
|
|
dc666c66f2 | ||
|
|
be071f5035 | ||
|
|
5b20b51d28 | ||
|
|
28f833aee1 | ||
|
|
5ec5689b67 | ||
|
|
a459b5d2cc | ||
|
|
ce6e85b863 | ||
|
|
8a901852d6 | ||
|
|
0c4000d461 | ||
|
|
3bf8e3a8d0 | ||
|
|
a9c683d500 | ||
|
|
c965455def | ||
|
|
31516a8b07 | ||
|
|
d2c3d332d3 | ||
|
|
884c6dd14c | ||
|
|
b5e5581acc | ||
|
|
713d547133 | ||
|
|
9121098b78 | ||
|
|
bfb8da8feb | ||
|
|
07a7b6d3d7 | ||
|
|
702b0dc1f4 | ||
|
|
05940b0361 | ||
|
|
7d7a54d1a6 | ||
|
|
d32a8c7698 | ||
|
|
06d12ddfa2 | ||
|
|
49469336fc | ||
|
|
ee226edae5 | ||
|
|
6b12556453 | ||
|
|
6a48219059 | ||
|
|
9e1a8c821b | ||
|
|
6e00350ed4 | ||
|
|
918c707e2b | ||
|
|
cb93a753bb | ||
|
|
2684e9be50 | ||
|
|
faa2607d9b | ||
|
|
7281c280d2 | ||
|
|
8670070b0a | ||
|
|
e06d966d36 | ||
|
|
3ac4eba228 | ||
|
|
c303807db2 | ||
|
|
df2229db90 | ||
|
|
f7393432ff | ||
|
|
d4ee3cf56b | ||
|
|
a8838f0465 | ||
|
|
e6f2a4c040 | ||
|
|
821a951761 | ||
|
|
3f2b1cf8a5 | ||
|
|
a8356f29a7 | ||
|
|
8a7cc6547c | ||
|
|
8f9445d3f9 | ||
|
|
91fce8c5dd | ||
|
|
902ec11fb6 | ||
|
|
c1210d9556 | ||
|
|
3725a55729 | ||
|
|
6749d6fa98 | ||
|
|
ca2049ad71 | ||
|
|
7fe84924f8 | ||
|
|
e257fc9520 | ||
|
|
ded31b58b4 | ||
|
|
acf85ec4d4 | ||
|
|
3352fde99f | ||
|
|
67e70bfd9b | ||
|
|
98da7cd0a5 | ||
|
|
29061b64f7 | ||
|
|
671d153de7 | ||
|
|
aa1e79f210 | ||
|
|
a73a4ea6c2 | ||
|
|
890650fbb5 | ||
|
|
e0f6a9c96b | ||
|
|
2d41a134bf | ||
|
|
667838351b | ||
|
|
b79e0f0173 | ||
|
|
1db7a86515 | ||
|
|
90631efc8d | ||
|
|
d696caf330 | ||
|
|
e230186787 | ||
|
|
ee9a8b4768 | ||
|
|
6e61b7db1b | ||
|
|
a33feb0292 | ||
|
|
4bbb7a1bc4 | ||
|
|
7086a2a4c9 | ||
|
|
c1446e2b8d | ||
|
|
57161eddba | ||
|
|
6d173d8b43 | ||
|
|
5e83411e64 | ||
|
|
254e878e48 | ||
|
|
6cf9cfcc82 | ||
|
|
3657301773 | ||
|
|
ed3cf0ac44 | ||
|
|
4ee648a9c8 | ||
|
|
9e84501293 | ||
|
|
a07d6cb904 | ||
|
|
e1b4034b26 | ||
|
|
7d3a3ac779 | ||
|
|
cf81343402 | ||
|
|
09515e2520 | ||
|
|
5440214ad7 | ||
|
|
3d445fe381 | ||
|
|
f8067570ba | ||
|
|
222fb82852 | ||
|
|
4c23dee643 | ||
|
|
14b4926a06 | ||
|
|
633dba140b | ||
|
|
e601a40811 | ||
|
|
c063ed29d2 | ||
|
|
8c4d5cae72 | ||
|
|
246f9d81c1 | ||
|
|
b8e938a053 | ||
|
|
ff29f7f165 | ||
|
|
7cae473f2c | ||
|
|
c6be154e47 | ||
|
|
51a5efcee3 | ||
|
|
9b5e22eb76 | ||
|
|
4bc54249e3 | ||
|
|
f3cd574ac3 | ||
|
|
f686661f5f | ||
|
|
779415f523 | ||
|
|
2aefc13cc2 | ||
|
|
9f84f7ffec | ||
|
|
5ef5e8e65b | ||
|
|
3d6450fc0f | ||
|
|
6bc5cec8f2 | ||
|
|
e2c8a27eca | ||
|
|
833935a07f | ||
|
|
3731330ebb | ||
|
|
7ad05ce959 | ||
|
|
b1e70ba3f1 | ||
|
|
1503838060 | ||
|
|
6dd7c6bdeb | ||
|
|
6768166551 | ||
|
|
eb67401dcb | ||
|
|
7d54a1b2bf | ||
|
|
6e7bbf106d | ||
|
|
4ab3c2c2e3 | ||
|
|
f6b0eaa121 | ||
|
|
bb15492dc5 | ||
|
|
555a2727f3 | ||
|
|
011da1207d | ||
|
|
d50c0dc184 | ||
|
|
53e4d01105 | ||
|
|
3bf1341d60 | ||
|
|
baee4c3636 | ||
|
|
35c5000510 | ||
|
|
072bd181e0 | ||
|
|
796b57ef91 | ||
|
|
5a53082386 | ||
|
|
ea198bcf76 | ||
|
|
a0f9a11220 | ||
|
|
532d9eb391 | ||
|
|
4e70b38a95 | ||
|
|
2d9439b962 | ||
|
|
691fe53a0b | ||
|
|
a11971b3ed | ||
|
|
8ea6a01db9 | ||
|
|
dcce243fc2 | ||
|
|
08f7886841 | ||
|
|
0fda2aa47a | ||
|
|
09c1bfec7e | ||
|
|
3ceba8cddc | ||
|
|
9f5d8e9657 | ||
|
|
888824eae1 | ||
|
|
bd763beb78 | ||
|
|
43d5d26901 | ||
|
|
18f1af4e29 | ||
|
|
aeba4e6224 | ||
|
|
e78b3daf64 | ||
|
|
609231fe4d | ||
|
|
b67e5196e8 | ||
|
|
45e6ca7564 | ||
|
|
50bb223ddb | ||
|
|
adf453481a | ||
|
|
70e4152290 | ||
|
|
dd76baee9d | ||
|
|
caf12171ff | ||
|
|
192a53bd73 | ||
|
|
bb45294580 | ||
|
|
875e58acae | ||
|
|
08ddd40331 | ||
|
|
a896c8c81c | ||
|
|
90f4845f6f | ||
|
|
36fdbe42d6 | ||
|
|
6c048296bb | ||
|
|
b6155c9093 | ||
|
|
eac9e5725a | ||
|
|
e59897a70c | ||
|
|
7f0c3d7471 | ||
|
|
50f650319a | ||
|
|
6682b3d792 | ||
|
|
02f270f821 | ||
|
|
3ba96aed2b | ||
|
|
c4220565f9 | ||
|
|
52a4bf6ba2 | ||
|
|
461e962acf | ||
|
|
a72d48ebd5 | ||
|
|
1cbb1e03bd | ||
|
|
331f8c02c5 | ||
|
|
bfc71aa9fe | ||
|
|
e864162f0c | ||
|
|
3e6037ec96 | ||
|
|
4120b86ba4 | ||
|
|
c22020112b | ||
|
|
f21dafd7f9 | ||
|
|
fa2f54345a | ||
|
|
7f58e71351 | ||
|
|
8f3156d08d | ||
|
|
199e79205d | ||
|
|
0c3ef2d951 | ||
|
|
cf29b2436a | ||
|
|
44f6e8a331 | ||
|
|
e79159ff2d | ||
|
|
826f39a57a | ||
|
|
16ea1221e1 | ||
|
|
8a7fd125b2 | ||
|
|
681fa8ab77 | ||
|
|
c15ce613b2 | ||
|
|
efb4b9d40b | ||
|
|
3c067f2d2f | ||
|
|
9b981c9930 | ||
|
|
d8fec8c6ef | ||
|
|
5f2fa34563 | ||
|
|
6b954cb144 | ||
|
|
ca9621ec3d | ||
|
|
4faef40090 | ||
|
|
2f0d7080c4 | ||
|
|
5ac7db9a34 | ||
|
|
131611dd1f | ||
|
|
c57fa0c083 | ||
|
|
33295fe50e | ||
|
|
ca925e0c9b | ||
|
|
5b1cd866c7 | ||
|
|
dc4ef55c74 | ||
|
|
b67840cb0c | ||
|
|
ed50d5a07d | ||
|
|
2f6d98af2b | ||
|
|
420c7f042a | ||
|
|
3100718d55 | ||
|
|
179e84ae4b | ||
|
|
b11ca16998 | ||
|
|
5312b20d47 | ||
|
|
3afeebb47e | ||
|
|
59fb8f92c8 | ||
|
|
3fea99a8b0 | ||
|
|
2f1f356cdb | ||
|
|
94f9ad33da | ||
|
|
bd39d65369 | ||
|
|
961ab9bf45 | ||
|
|
94fbe6e6b5 | ||
|
|
c201413221 | ||
|
|
6ced6f2717 | ||
|
|
8220d9ee8c | ||
|
|
bf9d468ece | ||
|
|
cffd93ba3c | ||
|
|
ed6b45e2ca | ||
|
|
b7a0b10655 | ||
|
|
334f22a227 | ||
|
|
145e2d5015 | ||
|
|
67d1842855 | ||
|
|
5bb6e2d69b | ||
|
|
403cbd3a59 | ||
|
|
4d42600b20 | ||
|
|
bf7d08cb1e | ||
|
|
695883428d | ||
|
|
37f334d38b | ||
|
|
4fd9b07b9d | ||
|
|
2941639e8f | ||
|
|
0839c9a2d8 | ||
|
|
ed886d0e8d | ||
|
|
2d67968060 | ||
|
|
a5531ea1e3 | ||
|
|
c45a0f9ce1 | ||
|
|
6a694a35f1 | ||
|
|
4a71109852 | ||
|
|
cc778456b7 | ||
|
|
221ba52d5c | ||
|
|
29a19186ab | ||
|
|
6e420ec4b7 | ||
|
|
acc8032424 | ||
|
|
18d54ce582 | ||
|
|
266afa517b | ||
|
|
35f1dc476f | ||
|
|
f69f711c03 | ||
|
|
bac2d63428 | ||
|
|
77b6145f09 | ||
|
|
fd9e0a786d | ||
|
|
2d2883a117 | ||
|
|
d09d585f3e | ||
|
|
7d54aa2885 | ||
|
|
419560a636 | ||
|
|
c8e7937354 | ||
|
|
76cfd86852 | ||
|
|
ab204bc70d | ||
|
|
99321f8ddd | ||
|
|
f61f3a1d8b | ||
|
|
9c8b9cf356 | ||
|
|
f357f86d5a | ||
|
|
c857a38d59 | ||
|
|
042b6ba652 | ||
|
|
c4a9e0c68b | ||
|
|
bb6c546f17 | ||
|
|
ab2e998bc7 | ||
|
|
3c9de1d04d | ||
|
|
fd52458085 | ||
|
|
4730dddd5e | ||
|
|
f2e9910894 | ||
|
|
b6aa7b667f | ||
|
|
819af8b70d | ||
|
|
b81bdae191 | ||
|
|
8737daabdb | ||
|
|
259ff05432 | ||
|
|
f22360a967 | ||
|
|
d31d4f5679 | ||
|
|
a4ff9168d0 | ||
|
|
a89b7e613b | ||
|
|
f6ae3d98b1 | ||
|
|
024afea086 | ||
|
|
46766e76f5 | ||
|
|
d291bd31b5 | ||
|
|
f1392f6064 | ||
|
|
c07e5769bb | ||
|
|
f582bf684b | ||
|
|
09c6c9c962 | ||
|
|
a421e3f8dd | ||
|
|
89493d1a27 | ||
|
|
619b6e0762 | ||
|
|
0be9af0b30 | ||
|
|
b9b3c19014 | ||
|
|
1a2b9660f9 | ||
|
|
621f470057 | ||
|
|
4bb8a1cf81 | ||
|
|
0841808b7a | ||
|
|
ec53373289 | ||
|
|
2b3b645d5e | ||
|
|
7e3b1b7b4c | ||
|
|
226c940556 | ||
|
|
4b25f97a2f | ||
|
|
9d70fd98cd | ||
|
|
1b357c7803 | ||
|
|
4a90b18680 | ||
|
|
4a0081c54f | ||
|
|
7b02014f58 | ||
|
|
724614b919 | ||
|
|
4cab9c05b6 | ||
|
|
b2941eeff0 | ||
|
|
0a63809400 | ||
|
|
c996d93999 | ||
|
|
a7249768a2 | ||
|
|
864710833e | ||
|
|
34043730d8 | ||
|
|
a94b7891a4 | ||
|
|
de3ffcfaea | ||
|
|
4fbe8b6385 | ||
|
|
7d3e1582a8 | ||
|
|
d6cde81ff0 | ||
|
|
c661316bf6 | ||
|
|
137168ed73 | ||
|
|
f564019f97 | ||
|
|
e911016c17 | ||
|
|
ff3c98350d | ||
|
|
6a08adf608 | ||
|
|
60f595496d | ||
|
|
d27ef3146c | ||
|
|
4d43669a3f | ||
|
|
9e626483d0 | ||
|
|
c1784b4eb2 | ||
|
|
6049d3d2e7 | ||
|
|
83b1351de3 | ||
|
|
fafcc6846b | ||
|
|
8f94011aa6 | ||
|
|
b4f71a37fc | ||
|
|
cc63806f23 | ||
|
|
2bb9bc0295 | ||
|
|
0e31b1c7b7 | ||
|
|
b41ef921e8 | ||
|
|
b1424a629b | ||
|
|
50e768fe27 | ||
|
|
7b1231d6f8 | ||
|
|
c3d67407c9 | ||
|
|
02e730dba9 | ||
|
|
59b74e2c53 | ||
|
|
4c6ef57917 | ||
|
|
bdc9b17dc1 | ||
|
|
af3c6ea8c3 | ||
|
|
f5700b29d8 | ||
|
|
5605e38fe8 | ||
|
|
471f5cb78b | ||
|
|
b15faf8f87 | ||
|
|
2be106aaae | ||
|
|
78b493b9b7 | ||
|
|
24e720488d | ||
|
|
96b77bc494 | ||
|
|
f409a4273b | ||
|
|
c9c678a115 | ||
|
|
6f4821f77b | ||
|
|
b5cb34092b | ||
|
|
954c939197 | ||
|
|
44d1c7129a | ||
|
|
82557db819 | ||
|
|
610d7923ac | ||
|
|
91ad44d53e | ||
|
|
1f9ba1d2f3 | ||
|
|
0291fdff08 | ||
|
|
719292eee9 | ||
|
|
2d786fab8c | ||
|
|
647fcfc14a | ||
|
|
3b436bcbb5 | ||
|
|
7c1ac4e3a9 | ||
|
|
84187bf9a6 | ||
|
|
5fd40ea80b | ||
|
|
961a97ae75 | ||
|
|
f86a6635e6 | ||
|
|
cbe4a80d16 | ||
|
|
30bcf7dc11 | ||
|
|
4f5ed6b2da | ||
|
|
ae313095a8 | ||
|
|
2c30bec578 | ||
|
|
b4fb31a53c | ||
|
|
3d18bf1c58 | ||
|
|
bee7f53b67 | ||
|
|
39a56780eb | ||
|
|
ce1d390da6 | ||
|
|
dd0b1ec579 | ||
|
|
87b59db253 | ||
|
|
79dcae0b0f | ||
|
|
9c60fdbcbf | ||
|
|
62b06ec721 | ||
|
|
b27a661fc6 | ||
|
|
d7de82d61d | ||
|
|
f53d9edfe9 | ||
|
|
e6065f02e1 | ||
|
|
97a1576096 | ||
|
|
7816a48c12 | ||
|
|
f30d9fd73d | ||
|
|
8c09df93af | ||
|
|
bf354de47e | ||
|
|
3415459861 | ||
|
|
8f3e08958b | ||
|
|
f5138e22de | ||
|
|
dc18f68b07 | ||
|
|
d62b0f7fa8 | ||
|
|
bf59d3bcb1 | ||
|
|
fa2b79271c | ||
|
|
1a76bfdb15 | ||
|
|
e09cc97a75 | ||
|
|
b1a7c0e3f7 | ||
|
|
b2136d6dec | ||
|
|
2a32ff20e0 | ||
|
|
a45933a1db | ||
|
|
7a6bd5beb2 | ||
|
|
d0e6e3fdb8 | ||
|
|
53d4bd2e45 | ||
|
|
6c82dc3c99 | ||
|
|
1258a0daf1 | ||
|
|
037a2e2f43 | ||
|
|
747e1aa628 | ||
|
|
cc5b7ae7d3 | ||
|
|
23f4754f19 | ||
|
|
76a8378a53 | ||
|
|
08d43ec3be | ||
|
|
e906a57fb3 | ||
|
|
6f4231ef8b | ||
|
|
b9583cd87f | ||
|
|
add513886e | ||
|
|
0caac90f3c | ||
|
|
9cbe932215 | ||
|
|
9771101e76 | ||
|
|
323a570906 | ||
|
|
b4f76a5890 | ||
|
|
66461e7b7a | ||
|
|
34b2b26e3e | ||
|
|
89b8edcfc9 | ||
|
|
1e55fd531a | ||
|
|
96281c1ef5 | ||
|
|
a5a1c1d334 | ||
|
|
d11d2324e5 | ||
|
|
79977cbc61 | ||
|
|
e3fef3523b | ||
|
|
c6b4c87e77 | ||
|
|
a13eef80a8 | ||
|
|
ad28fa550b | ||
|
|
a6dd976775 | ||
|
|
1b4b00015a | ||
|
|
6b6571f701 | ||
|
|
cad03a5f27 | ||
|
|
477d1ecfd3 | ||
|
|
9ddfe94a31 | ||
|
|
e22a6faa99 | ||
|
|
a9637d4aa4 | ||
|
|
ef213acf92 | ||
|
|
c0e1442d78 | ||
|
|
f0eba74556 | ||
|
|
116532a44c | ||
|
|
fc7f4dcc18 | ||
|
|
88b4664a73 | ||
|
|
fc2025c1b9 | ||
|
|
cc9a32769d | ||
|
|
eee99754da | ||
|
|
fce93f9a03 | ||
|
|
d2edbae9f0 | ||
|
|
c624cde011 | ||
|
|
724b11d303 | ||
|
|
a827553ae1 | ||
|
|
debc96c5a3 | ||
|
|
8cb994c635 | ||
|
|
b9cdf86567 | ||
|
|
d8f281fe04 | ||
|
|
0d800904d8 | ||
|
|
ca93d0ee75 | ||
|
|
d2590d863c | ||
|
|
3d465d1a05 | ||
|
|
c553abaf29 | ||
|
|
721daabc59 | ||
|
|
f1050560c1 | ||
|
|
915a3107fe | ||
|
|
af2bec2215 | ||
|
|
7c4cb1a886 | ||
|
|
f3fd694b7b | ||
|
|
4081b12c44 | ||
|
|
82314f5282 | ||
|
|
bd2f530949 | ||
|
|
f367733871 | ||
|
|
5f47281301 | ||
|
|
927f64a784 | ||
|
|
02bb2f6885 | ||
|
|
ea5728d2b0 | ||
|
|
8f18cb9acc | ||
|
|
f411b9c5d7 | ||
|
|
9b47a633f4 | ||
|
|
7db99d9dba | ||
|
|
0addbdbb46 | ||
|
|
c5cea324c3 | ||
|
|
8c9ef8feab | ||
|
|
338bb215df | ||
|
|
21c4c6de8f | ||
|
|
c71704b06d | ||
|
|
801d17c60b | ||
|
|
9f33267466 | ||
|
|
662e17093b | ||
|
|
71a5a1158b | ||
|
|
55a217cd66 | ||
|
|
6de415adc3 | ||
|
|
120b7227d3 | ||
|
|
6d7ce0f075 | ||
|
|
9188402fc4 | ||
|
|
31d3af16dc | ||
|
|
dae3fc6fcb | ||
|
|
1f3b3e0a2f | ||
|
|
9ddbab85b0 |
No files matched your search
@@ -1,3 +1,31 @@
|
||||
2002-04-23 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* configure.in: removed -Wshadow from CFLAGS.
|
||||
|
||||
2002-04-12 Rodrigo Moya <[email protected]>
|
||||
|
||||
* status/maintainers.xml: added danmorg and myself for System.Data.*
|
||||
classes.
|
||||
|
||||
* status/class.xml: added System.Data.* classes.
|
||||
|
||||
2002-04-08 Dick Porter <[email protected]>
|
||||
|
||||
* configure.in: Set -mno-cygwin here rather than in the build script
|
||||
|
||||
2002-04-05 Dietmar Maurer <[email protected]>
|
||||
|
||||
* mono/tests/remoting2.cs: new test for async invoke of proxy calls
|
||||
|
||||
2002-03-29 Martin Baulig <[email protected]>
|
||||
|
||||
* doc/jit-debug, docs/jit-debug-sample, docs/jit-debug-sample2:
|
||||
New files, added documentation for the debugging code.
|
||||
|
||||
* doc/web/commands: Added the debugging pages.
|
||||
|
||||
* docs/jit-debug: Removed, this is now on the web site.
|
||||
|
||||
2002-03-24 Martin Baulig <[email protected]>
|
||||
|
||||
* man/mcs.1: Documented the new --debug option and added a section
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
SUBDIRS = mono doc runtime scripts man
|
||||
SUBDIRS = mono doc docs runtime scripts man
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
#undef HAVE_INET_PTON
|
||||
#undef HAVE_INET_ATON
|
||||
#undef HAVE_SOL_IP
|
||||
#undef HAVE_SOL_TCP
|
||||
#undef HAVE_IP_PKTINFO
|
||||
#undef HAVE_STRUCT_IP_MREQN
|
||||
#undef HAVE_PTHREAD
|
||||
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
|
||||
#undef USE_MONO_MUTEX
|
||||
#undef HAVE_LARGE_FILE_SUPPORT
|
||||
#undef PLATFORM_WIN32
|
||||
#undef HAVE_NEW_ICONV
|
||||
#undef NAME_DEV_RANDOM
|
||||
#undef HAVE_CRYPT_RNG
|
||||
#undef HAVE_BOEHM_GC
|
||||
|
||||
/* The number of bytes in a void *. */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* Define if you have the inet_aton function. */
|
||||
#undef HAVE_INET_ATON
|
||||
|
||||
/* Define if you have the inet_pton function. */
|
||||
#undef HAVE_INET_PTON
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define if you have the <sys/filio.h> header file. */
|
||||
#undef HAVE_SYS_FILIO_H
|
||||
|
||||
/* Define if you have the <sys/sockio.h> header file. */
|
||||
#undef HAVE_SYS_SOCKIO_H
|
||||
|
||||
/* Define if you have the <utime.h> header file. */
|
||||
#undef HAVE_UTIME_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
+28
-20
@@ -2,9 +2,26 @@
|
||||
AC_INIT(README)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono, 0.10)
|
||||
AM_INIT_AUTOMAKE(mono, 0.11)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
dnl ****************************************
|
||||
dnl *** Check if we're building on win32 ***
|
||||
dnl ****************************************
|
||||
AC_MSG_CHECKING([if building for some Win32 platform])
|
||||
case "$host" in
|
||||
*-*-mingw*|*-*-cygwin*)
|
||||
platform_win32=yes
|
||||
AC_DEFINE(PLATFORM_WIN32)
|
||||
CC="gcc -mno-cygwin"
|
||||
;;
|
||||
*)
|
||||
platform_win32=no
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($platform_win32)
|
||||
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
|
||||
|
||||
AC_CHECK_TOOL(CC, gcc, gcc)
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
@@ -30,13 +47,16 @@ AM_PROG_LIBTOOL
|
||||
|
||||
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h)
|
||||
|
||||
AC_CHECK_HEADERS(iconv.h)
|
||||
AC_CHECK_HEADERS(giconv.h)
|
||||
|
||||
# for mono/metadata/debug-symfile.c
|
||||
AC_CHECK_HEADERS(elf.h)
|
||||
|
||||
# not 64 bit clean in cross-compile
|
||||
AC_CHECK_SIZEOF(void *, 4)
|
||||
|
||||
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations'
|
||||
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
|
||||
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
if test "x$PKG_CONFIG" = "xno"; then
|
||||
@@ -79,7 +99,7 @@ AC_SUBST(GMODULE_CFLAGS)
|
||||
AC_SUBST(GMODULE_LIBS)
|
||||
|
||||
AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes")
|
||||
gc=none
|
||||
gc=auto
|
||||
AC_ARG_WITH(gc, [ --with-gc=boehm,none],[gc=$with_gc])
|
||||
|
||||
case "x$gc" in
|
||||
@@ -92,6 +112,9 @@ case "x$gc" in
|
||||
AC_SUBST(HAVE_BOEHM_GC)
|
||||
LIBS="$LIBS -lgc"
|
||||
;;
|
||||
xnone)
|
||||
AC_MSG_WARN("Compiling mono without GC.")
|
||||
;;
|
||||
*)
|
||||
dnl When the JIT works with libgc, use this chunk.
|
||||
dnl # If libgc was found, use it. Otherwise just warn.
|
||||
@@ -107,22 +130,6 @@ dnl AC_MSG_WARN("Compiling mono without GC.")
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl ****************************************
|
||||
dnl *** Check if we're building on win32 ***
|
||||
dnl ****************************************
|
||||
AC_MSG_CHECKING([if building for some Win32 platform])
|
||||
case "$host" in
|
||||
*-*-mingw*|*-*-cygwin*)
|
||||
platform_win32=yes
|
||||
AC_DEFINE(PLATFORM_WIN32)
|
||||
;;
|
||||
*)
|
||||
platform_win32=no
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($platform_win32)
|
||||
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
|
||||
|
||||
if test x$platform_win32 = xno; then
|
||||
dnl ******************************************************************
|
||||
dnl *** Check for large file support ***
|
||||
@@ -472,7 +479,7 @@ mono/arch/sparc/Makefile
|
||||
mono/arch/arm/Makefile
|
||||
mono/interpreter/Makefile
|
||||
mono/tests/Makefile
|
||||
mono/wrapper/Makefile
|
||||
mono/benchmark/Makefile
|
||||
mono/monoburg/Makefile
|
||||
mono/monograph/Makefile
|
||||
mono/jit/Makefile
|
||||
@@ -481,6 +488,7 @@ runtime/Makefile
|
||||
scripts/Makefile
|
||||
man/Makefile
|
||||
doc/Makefile
|
||||
docs/Makefile
|
||||
])
|
||||
|
||||
echo "
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
WEB_FILES= \
|
||||
c-sharp class-library contact contributing documentation download \
|
||||
ado-net c-sharp class-library contact contributing documentation download \
|
||||
faq gcc-frontend ideas index passport rationale resources \
|
||||
roadmap runtime status team testing thanks tools porting anoncvs monodoc-xml
|
||||
roadmap runtime status team testing thanks tools porting anoncvs monodoc-xml winforms
|
||||
|
||||
OTHERS= pending resources-pending todo mono-build.sh mono-build-w32.sh
|
||||
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
* ADO.NET
|
||||
|
||||
The coordinator for the ADO.NET implementation is <a
|
||||
href="mailto:[email protected]">Rodrigo Moya</a>.
|
||||
|
||||
* Action plan
|
||||
|
||||
The current plan to implement ADO.NET is as follows:
|
||||
|
||||
<b>Step 1:</b> SqlClient:
|
||||
|
||||
<ul>
|
||||
* Implementation of System.Data.SqlClient based on
|
||||
the PostgreSQL C API.
|
||||
|
||||
* Once the System.Data.SqlClient code is functional and
|
||||
is usable by other people, we willl move it to
|
||||
System.Data.PostgreSQL, and will convert the existing
|
||||
System.Data.SqlClient to be just a wrapper around
|
||||
System.Data.PostgreSQL.
|
||||
|
||||
</ul>
|
||||
|
||||
<b>Step 2:</b> OleDBClient:
|
||||
<ul>
|
||||
* On Unix systems: System.Data.OleDb will use LibGDA as its
|
||||
engine.
|
||||
|
||||
LibGDA is the data access engine that is used by
|
||||
Gnome-Db (only libgda, not libgnomedb at all).
|
||||
|
||||
* On Windows systems: System.Data.OleDb will use OLE-DB as
|
||||
its engine.
|
||||
</ul>
|
||||
|
||||
<b>Step 3:</b> System.Data.SqlClient Providers:
|
||||
|
||||
<ul>
|
||||
* System.Data.SqlClient will then become a generic
|
||||
proxy for binding to other SQL implementations other
|
||||
than PostgreSQL (MySQL on Unix/Windows; MS SQL on
|
||||
Window; Interbase on Unix/Windows). Others are welcomed.
|
||||
</ul>
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
* ASP.NET
|
||||
|
||||
The classes for running ASP.NET are being actively written.
|
||||
Gaurav, Leen and Patrik have been building the classes
|
||||
required to run ASP.NET web application as well as a small
|
||||
embeddable web server.
|
||||
|
||||
Currently ASP.NET does not work, but work is underway. If you
|
||||
are interested in helping the effort please contact the
|
||||
mono-list mailing list.
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
A Programmer's Introduction to C# - Second Edition: Eric Gunnerson
|
||||
|
||||
* Remoting
|
||||
|
||||
<a href="http://www.dotnetremoting.cc/book/AdvancedDotNetRemoting.asp">
|
||||
Advanced .NET Remoting: Ingo Rammer</a>
|
||||
|
||||
* Compiler Implementation
|
||||
|
||||
Compilers - Principles, Techniques, and Tools: Alfred V. Aho, Ravi Sethi,
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
for the first time on December 28 2001. MCS became self hosting
|
||||
on January 3rd, 2002.
|
||||
|
||||
The Mono Runtime and the Mono execution engine were able to make
|
||||
our compiler self hosting on March 12, 2002.
|
||||
|
||||
A test suite is maintained to track the progress of
|
||||
the compiler and various programs are routinely compiled and
|
||||
ran.
|
||||
|
||||
+28
-1
@@ -32,4 +32,31 @@
|
||||
** Class Library documentation
|
||||
|
||||
We are moving to a new setup for documenting the class libraries,
|
||||
you can read about it <a href="classlib-doc.html">here</a>
|
||||
and you can read about it <a href="classlib-doc.html">here</a>.
|
||||
|
||||
A few words of warning and advice for class documentors:
|
||||
|
||||
A well-documented API can ease hours of frustration; as Mono
|
||||
matures, robust and complete class library documentation will
|
||||
become increasingly important. As you write API documentation,
|
||||
whether it is embedded in source files or in external Monodoc XML,
|
||||
please keep the following in mind:
|
||||
|
||||
Plagarism, even if it's unintentional, is a Bad Thing(TM).
|
||||
Microsoft's .NET Framework Class Library documentation is an
|
||||
excellent resource for understanding the behavior and properties of
|
||||
a type, and a lot of hard work went in to creating this (copyrighted)
|
||||
resource. Please don't copy from Microsoft's reference when
|
||||
documenting a type.
|
||||
|
||||
To avoid this, I (<a href="mailto:[email protected]">[email protected]</a>)
|
||||
suggest that you read the complete Microsoft documentation for a type,
|
||||
ponder it for a while, and write the Mono documentation in your own
|
||||
words. While it's certainly okay to refer to the Microsoft
|
||||
documentation to clarify your understanding of behavior or properties,
|
||||
please don't open the Microsoft docs and refer to them for each member
|
||||
you document.
|
||||
|
||||
There's a lot of domain expertise among the class library contributors;
|
||||
let's put the same personal stamp on the class library documentation
|
||||
that we have on the class libraries themselves.
|
||||
+36
-8
@@ -29,21 +29,22 @@
|
||||
mono-cvs-list</a> mailing list. The CVS source code can also
|
||||
be browsed <a href="http://cvs.hispalinux.es/cgi-bin/cvsweb/mcs/mcs/cfold.cs?cvsroot=Mono">here</a>
|
||||
|
||||
<a name="feb-22">
|
||||
<b>Mono 0.9</b>
|
||||
<a name=apr-24">
|
||||
<b>Mono 0.11</b>
|
||||
|
||||
New packaged versions of the Mono C# compiler and Mono runtime
|
||||
are now available. The latest version is 0.9.
|
||||
are now available. The latest version is 0.11.
|
||||
|
||||
<ul>
|
||||
* <a href="archive/mono-0.9">Mono 0.9 release notes</a>
|
||||
* <a href="archive/mono-0.11">Mono 0.11 release notes</a>
|
||||
|
||||
* <a href="archive/mcs-0.9.tar.gz">mcs-0.9.tar.gz</a>
|
||||
* <a href="archive/mcs-0.11.tar.gz">mcs-0.11.tar.gz</a>
|
||||
Mono C# compiler
|
||||
* <a href="archive/mono-0.9.tar.gz">mono-0.9.tar.gz</a>
|
||||
* <a href="archive/mono-0.11.tar.gz">mono-0.11.tar.gz</a>
|
||||
Mono runtime
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="snapshots">
|
||||
For up to date sources, it is recommended that you use the Mono
|
||||
source code from either the
|
||||
@@ -89,6 +90,11 @@
|
||||
set your CVSROOT environment variable before running the script to
|
||||
select a particular cvs server.
|
||||
|
||||
** Mono Regression Test Suite
|
||||
|
||||
You can get binaries for the Mono Regression Test Suite <a
|
||||
href="archive/mono-tests.tar.gz">here</a>
|
||||
|
||||
<a name="install">
|
||||
** Building the software manually
|
||||
|
||||
@@ -246,9 +252,31 @@ make install</strong>
|
||||
|
||||
<a name="oldreleases">
|
||||
|
||||
*** Very old releases.
|
||||
*** Old releases.
|
||||
|
||||
<ul>
|
||||
<ul>
|
||||
|
||||
<ul>
|
||||
<a name="mar-27">
|
||||
<b>Mono 0.10; March 27, 2002</b>
|
||||
* <a href="archive/mono-0.10">Mono 0.10 release notes</a>
|
||||
* <a href="archive/mcs-0.10.tar.gz">mcs-0.10.tar.gz</a>
|
||||
Mono C# compiler
|
||||
* <a href="archive/mono-0.10.tar.gz">mono-0.10.tar.gz</a>
|
||||
Mono runtime
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<a name="feb-22">
|
||||
<b>Mono 0.9; February 22, 2002</b>
|
||||
* <a href="archive/mono-0.9">Mono 0.9 release notes</a>
|
||||
|
||||
* <a href="archive/mcs-0.9.tar.gz">mcs-0.9.tar.gz</a>
|
||||
Mono C# compiler
|
||||
* <a href="archive/mono-0.9.tar.gz">mono-0.9.tar.gz</a>
|
||||
Mono runtime
|
||||
</ul>
|
||||
|
||||
<a name="feb-11">
|
||||
<b>February 11, 2002</b>
|
||||
* <a href="archive/mcs-0.8.tar.gz">mcs-0.8.tar.gz</a>
|
||||
|
||||
@@ -225,7 +225,7 @@ A: Yes, we will enable people to write GNOME applications using Mono.
|
||||
Q: Will Mono enable GUI applications to be authored?
|
||||
|
||||
A: Yes, you will be able to build GUI applications. Indeed, that is our
|
||||
main focus. We will provide both the Windows.Forms API and the Gtk# AP(I.
|
||||
main focus. We will provide both the Windows.Forms API and the Gtk# API.
|
||||
|
||||
Q: What is the difference between Gtk# and System.Windows.Forms?
|
||||
|
||||
@@ -393,6 +393,10 @@ Q: Can I serialize my objects to other things other than XML?
|
||||
A: Yes, although the serializing tools have not yet been planned, and
|
||||
you would probably have to implement them yourself.
|
||||
|
||||
Q: Will Mono use ORBit?
|
||||
|
||||
A: No. Mono will be using a new implementation of CORBA that isn't still started.
|
||||
|
||||
<a name="devel"></a>
|
||||
** Development Tools and Issues
|
||||
|
||||
@@ -688,3 +692,7 @@ Q: Will you support COM?
|
||||
A: The runtime will support XPCOM on Unix systems and COM on Windows.
|
||||
Most of the code for dynamic trampolines exists already.
|
||||
|
||||
Q: Will Ximian offer certifications on Mono or related technologies?.
|
||||
|
||||
A: It's possible. But there is no plan about this. So the short answer is no.
|
||||
|
||||
@@ -37,8 +37,9 @@
|
||||
<b><a href="c-sharp.html">C# Compiler</a></b>
|
||||
</td>
|
||||
<td>
|
||||
Self hosting on Linux and Windows.
|
||||
</td>
|
||||
<b>Self hosting on Linux</b><br>
|
||||
Self hosting on .NET.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -71,6 +72,124 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** Apr 24, 2002
|
||||
|
||||
<b>Mono 0.11 is out!</b> Mostly performance improvements, bug
|
||||
fixes and more classes are included.
|
||||
|
||||
A new version of the runtime, compiler and class libraries has
|
||||
been packaged for your download pleasure. Binaries are
|
||||
included. The <a href="archive/mono-0.11">Release Notes</a>
|
||||
are available.
|
||||
|
||||
You can get it <a
|
||||
href="download.html#apr-24">Here</a> (quick links: <a
|
||||
href="archive/mono-0.11.tar.gz">runtime</a> and <a
|
||||
href="archive/mcs-0.11.tar.gz">compiler/classes</a>).
|
||||
|
||||
** Apr 23, 2002
|
||||
|
||||
SharpDevelop 0.88a <a href="http://www.icsharpcode.net/OpenSource/SD">is out!</a>
|
||||
|
||||
Congratulations to the developers behind SharpDevelop for
|
||||
their new release.
|
||||
|
||||
** Apr 20, 2002
|
||||
|
||||
Some updates from the hacking lines:
|
||||
|
||||
<b>The web:</b> Patrik Torstensson last week contributed the
|
||||
http runtime support and started work on thread pools. This
|
||||
is part of the ASP.NET support.
|
||||
|
||||
<b>Docs:</b> John Barnette, John Sohn and Adam Treat have been
|
||||
hacking on MonoDoc.
|
||||
|
||||
<b>ADO.NET:</b> Daniel Morgan and Rodrigo Moya have been
|
||||
working on the <a href="ado-net">ADO.NET</a> support, and got
|
||||
the first signs of life this week (we can connect, insert
|
||||
rows; do transactions: commit/rollback; SQL errors and
|
||||
exceptions work). Check <a
|
||||
href="mailing-lists.html">mono-patches</a> for all the
|
||||
goodies.
|
||||
|
||||
<b>Optimizations:</b> A number of optimizations in the runtime
|
||||
made the compiler twice as fast this week:
|
||||
|
||||
Early this week Patrik started the string
|
||||
rewrite in the runtime. Today Dietmar finished the
|
||||
constructors and deployed the new layout.
|
||||
|
||||
Paolo got the JIT engine to generate profiles, which were in
|
||||
turn used to find hot spots in Reflection, which he improved.
|
||||
|
||||
Daniel Lewis (of Regex fame) noticed the performance issues
|
||||
with our current array layout, and contributed a new array
|
||||
representation.
|
||||
|
||||
At the same time Dietmar started the the JIT inline code and
|
||||
implemented constant propagation. These two optimizations
|
||||
together are very powerful.
|
||||
|
||||
<b>Bug fixing:</b> And of course everyone has been helping out
|
||||
with the bug fixing (Duncan, Gonzalo, Jonathan, Miguel, Nick,
|
||||
Ravi, Sergey)
|
||||
|
||||
|
||||
** Apr 18, 2002
|
||||
|
||||
Dietmar's inlining for the JIT engine just landed into
|
||||
CVS. This is only a first cut and more improvements will come later.
|
||||
|
||||
Patrik, Paolo, Dietmar and Gonzalo have been busy optimizing
|
||||
our class libraries and runtime engine to become faster. Many changes
|
||||
on CVS as well.
|
||||
|
||||
** Apr 11, 2002
|
||||
|
||||
Gtk# 0.1 "ButtonHook" has been <a
|
||||
href="http://lists.ximian.com/archives/public/gtk-sharp-list/2002-April/000048.html">released</a>
|
||||
|
||||
Binaries for the Mono Regression Test Suite are <a
|
||||
href="archive/mono-tests.tar.gz">available</a> for
|
||||
people porting the Mono Runtime to new platforms.
|
||||
|
||||
** Apr 6, 2002
|
||||
|
||||
<a href="http://www.dotnetremoting.cc/book/AdvancedDotNetRemoting.asp">
|
||||
Advanced .NET Remoting</a> from Ingo Rammer is now available. Ingo
|
||||
helped us to implement the proxy support and the book is a valuable
|
||||
resource for anyone interested in remoting.
|
||||
|
||||
** Apr 5, 2002
|
||||
|
||||
Transparent proxy support has been finished, congrats to
|
||||
Dietmar. Our JIT engine on CVS contains the implementation.
|
||||
This should enable people to test the remoting framework on
|
||||
Mono.
|
||||
|
||||
** Mar 28, 2002
|
||||
|
||||
Debugging information is now generated by the compiler thanks
|
||||
to Martin's work. The resulting dwarf file can be used to
|
||||
single step C# code in GDB. A document will be shortly published with
|
||||
the details.
|
||||
|
||||
** Mar 27, 2002
|
||||
|
||||
<b>Mono 0.10 is out!</b> The self hosting release of Mono has
|
||||
been released.
|
||||
|
||||
A new version of the runtime, compiler and class libraries has
|
||||
been packaged for your download pleasure. Binaries are
|
||||
included. The <a href="archive/mono-0.10">Release Notes</a>
|
||||
are available.
|
||||
|
||||
You can get it <a
|
||||
href="download.html#mar-27">Here</a> (quick links: <a
|
||||
href="archive/mono-0.10.tar.gz">runtime</a> and <a
|
||||
href="archive/mcs-0.10.tar.gz">compiler/classes</a>).
|
||||
|
||||
** Mar 26, 2002
|
||||
|
||||
Paolo finally fixed the last bug in the JITer that stopped
|
||||
@@ -134,7 +253,9 @@
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2002-March/003726.html">MCS
|
||||
compiler compiling itself on Linux</a>
|
||||
completely for the first time! The resulting image still contains
|
||||
some errors, but the whole compiler process goes now.
|
||||
some errors, but the whole compiler process goes now. Later in the day
|
||||
and a couple of small optimizations and bug fixes, the compile
|
||||
speed was improved in 400%
|
||||
|
||||
We are very close to have a complete self hosting environment now.
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
* Java
|
||||
|
||||
It would be interesting to support the Java language as part
|
||||
of the Mono project.
|
||||
|
||||
You have to think of Java as various pieces: Java the
|
||||
language and Java the virtual machine.
|
||||
|
||||
It is possible to compile Java to .NET, as shown by the
|
||||
Microsoft J# compiler. We could then allow the migration of
|
||||
Java applications to the Mono runtime.
|
||||
|
||||
** The translator.
|
||||
|
||||
It would be interesting to write a semantic translator that
|
||||
converts java byte codes into CIL opcodes. This is possible
|
||||
because the Java byte codes are a subset of the CIL ones.
|
||||
|
||||
A semantic tree needs to be constructed (very much in the
|
||||
spirit of what is done in mono_analize_stack in
|
||||
<tt>mono/mono/jit/jit.c</tt>. Once such a semantic tree is
|
||||
constructed, we could generate the equivalent Java code.
|
||||
|
||||
This has a number of interesting side effects: people can
|
||||
continue to use their existing Java compilers to compile their
|
||||
code, and a simple tool that converts their .class files into
|
||||
a .NET assembly can be used.
|
||||
|
||||
** Libraries
|
||||
|
||||
We could translate the GNU Classpath libraries with the above
|
||||
tools to provide the Java runtime required to host into the
|
||||
Mono runtime. Some special treatment would be required for
|
||||
core data types like integers, arrays and strings, and of
|
||||
course reuse where possible existing classes from .NET to make
|
||||
them compatible.
|
||||
|
||||
** JILC - Java to IL Compiler
|
||||
|
||||
This is an attempt to make the java bytecode available for the
|
||||
.NET environment.
|
||||
|
||||
The project attempts to generate the IL code / bytecode from the
|
||||
compiled java class files. It has reached the stage of code-generation.
|
||||
The issues that needs to be addressed is the mapping of java objects
|
||||
to the IL objects, eg: java.lang.String to System.String.
|
||||
|
||||
Gaurav Vaish and Abhaya Agarwal are currently leading this project.
|
||||
The project is currently hosted at <a href="http://sourceforge.net/projects/jilc">SourceForge.Net</a>.
|
||||
The official home page of the project is
|
||||
<a href="http://jilc.sourceforge.net">http://jilc.sourceforge.net</a>.
|
||||
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
* How to debug your C# application with the JIT engine
|
||||
|
||||
To debug a C# application you need to run the JIT in your debugger.
|
||||
|
||||
Before you can do anything useful in a debugger, you need a symbol
|
||||
file which tells your debugger about functions, types, line numbers
|
||||
and such. Unfortunately, this symbol file needs to be recreated each
|
||||
time the JIT compiles a new method since it doesn't know anything
|
||||
about this method (especially not its memory address) before actually
|
||||
compiling it.
|
||||
|
||||
You have two ways of creating a symbol file:
|
||||
|
||||
** Letting the JIT dynamically create the symbol file
|
||||
|
||||
This'll give you a symbol file which is suitable for debugging IL byte
|
||||
code - you won't see your C# source code.
|
||||
|
||||
However, this method has the advantage that it works with every assembly,
|
||||
no matter whether it has been compiled with Mono's C# compiler (MCS) or
|
||||
with any other compiler. It's currently the only way to debug
|
||||
<tt>corlib.dll</tt> or any other library which cannot be compiled with
|
||||
our compiler yet.
|
||||
|
||||
All that you need is a dump of the IL bytecode for each assembly (including
|
||||
all assemblies this assembly is referencing). This is done by using the
|
||||
<tt>monodis</tt> utility:
|
||||
|
||||
<pre>
|
||||
monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il<br>
|
||||
monodis /home/export/martin/MONO-LINUX/lib/System.dll > System.il<br>
|
||||
monodis /home/export/martin/MONO-LINUX/bin/mcs.exe > mcs.il
|
||||
</pre>
|
||||
|
||||
Make sure that all the .il files have the same name as their corresponding
|
||||
assembly and that they're all created in the current directory.
|
||||
|
||||
The JIT supports two different debugging file formats:
|
||||
|
||||
<ul>
|
||||
* STABS: This is a very simple debugging format, but it may be the only one
|
||||
which is supported on your system. It is limited to source files of no more
|
||||
than 65.535 lines and it's type support is also very limited. You should only
|
||||
use this if your debugger doesn't support DWARF 2.
|
||||
|
||||
To generate STABS output, use the <tt>--stabs</tt> command line argument.
|
||||
|
||||
|
||||
* DWARF 2: The DWARF 2 debugging format is a very powerful debugging format
|
||||
which can handle source files of arbitrary size and has a highly sophisticated
|
||||
type support. It's the recommended format unless you need to use STABS because
|
||||
your debugger doesn't support DWARF 2.
|
||||
|
||||
To generate DWARF 2 output, use the <tt>--dwarf</tt> command line argument.
|
||||
</ul>
|
||||
|
||||
|
||||
You need to regenerate the symbol file each time the JIT compiled a new
|
||||
method and each time you restart the JIT. You cannot reuse your symbol file
|
||||
if you start the JIT a second file, not even if you're running the same
|
||||
application with the same input data a second time.
|
||||
|
||||
Regenerating the symbol file is done by calling the JIT's
|
||||
<tt>mono_debug_make_symbols ()</tt> function from within your debugger and
|
||||
then reloading the symbol files. This function creates a <tt>filename-dwarf.s</tt>
|
||||
(or <tt>filename-stabs.s</tt>) assembler input file in the current directory and
|
||||
an object file in <tt>/tmp/filename.o</tt> - you need to tell your debugger to
|
||||
add this object file as symbol file.
|
||||
|
||||
If you're using the GNU debugger, this is done like this:
|
||||
|
||||
<pre>
|
||||
call mono_debug_make_symbols ()
|
||||
add-symbol-file /tmp/corlib.o
|
||||
add-symbol-file /tmp/mcs.o
|
||||
add-symbol-file /tmp/Mono.CSharp.Debugger.o
|
||||
</pre>
|
||||
|
||||
You can also write a GDB macro like this:
|
||||
|
||||
<pre>
|
||||
define reload
|
||||
call mono_debug_make_symbols ()
|
||||
add-symbol-file /tmp/corlib.o
|
||||
add-symbol-file /tmp/mcs.o
|
||||
add-symbol-file /tmp/Mono.CSharp.Debugger.o
|
||||
end
|
||||
</pre>
|
||||
|
||||
Then you can just say <tt>reload</tt> to have GDB recreate the symbol file.
|
||||
|
||||
There's also an <a href="jit-debug-sample.html">example debugging session</a> using
|
||||
the GNU debugger.
|
||||
|
||||
** Using a symbol file which have been created by the Mono C# compiler
|
||||
|
||||
If you compiled your application with Mono's C# compiler (MCS), you can tell it to
|
||||
create a symbol file which is then processed and rewritten by the JIT engine.
|
||||
|
||||
To do this, you must give MCS the <tt>-g</tt> option:
|
||||
|
||||
<pre>
|
||||
$ mcs -g Foo.cs
|
||||
</pre>
|
||||
|
||||
This creates a <tt>Foo-debug.s</tt> assembler input file.
|
||||
|
||||
To use this in the JIT, you must first copy it to the target machine (the machine
|
||||
where you want to run the JIT to debug your application) and run it through the
|
||||
assembler to produce an object file <tt>Foo-debug.o</tt>. This object file must be
|
||||
in the current directory.
|
||||
|
||||
Then start the JIT in your debugger and give it the <tt>--dwarf-plus</tt> command
|
||||
line argument.
|
||||
|
||||
Each time you call <tt>mono_debug_make_symbols ()</tt> from withing your debugger,
|
||||
the JIT will read this <tt>Foo-debug.o</tt>, fix some machine dependent things like
|
||||
memory addresses etc. in it and write it back to disk.
|
||||
|
||||
If you're using the GNU debugger, you'll want to use a macro like this:
|
||||
|
||||
<pre>
|
||||
define relocate
|
||||
call mono_debug_make_symbols ()
|
||||
add-symbol-file /tmp/corlib.o
|
||||
add-symbol-file mcs-debug.o
|
||||
add-symbol-file Mono.CSharp.Debugger-debug.o
|
||||
end
|
||||
</pre>
|
||||
|
||||
If there is no <tt>assembly-debug.o</tt> file, but an <tt>assembly.il</tt> one, the
|
||||
JIT will fall back to normal DWARF 2 (in the example above, <tt>corlib.dll</tt> was
|
||||
compiled with Microsoft's compiler and the JIT is thus using DWARF to debug it).
|
||||
|
||||
This debugging method only works if you compiled your assembly with MCS, but it'll
|
||||
allow you to actually debug your C# source code :-)
|
||||
|
||||
Here's an <a href="jit-debug-sample2.html">example debugging session</a> using
|
||||
the GNU debugger.
|
||||
|
||||
** Breakpoints and single stepping
|
||||
|
||||
The JIT has a <tt>--debug</tt> command line argument to insert a breakpoint at the
|
||||
beginning of this method. It takes a <tt>Namespace.Class:Method</tt> argument which
|
||||
is the method. This argument can be given multiple times.
|
||||
|
||||
However, once your application is stopped in GDB you may want to insert a breakpoint
|
||||
the next time the JIT compiles a method. There's a global variable
|
||||
<tt>mono_debug_insert_breakpoint</tt> which you can modify in your debugger.
|
||||
|
||||
If this variable is set to a non-zero value, the JIT's <tt>arch_compile_method</tt>
|
||||
will insert a breakpoint the next time it is called, ie. at the top of the next
|
||||
method it compiles. If this value has a positive value, it acts as a counter and is
|
||||
decremented after inserting the breakpoint - setting it to a negative value will let
|
||||
the JIT insert the breakpoint each time it compiles a new method.
|
||||
|
||||
There's also global variable <tt>mono_debug_last_breakpoint_address</tt> which always
|
||||
contains the address of the last inserted breakpoint. You may manually override this
|
||||
address with a <tt>nop</tt> instruction to delete the breakpoint.
|
||||
|
||||
For instance, I have a GDB macro called <tt>enter</tt> which I use to enter a method
|
||||
rather than stepping over it:
|
||||
|
||||
<pre>
|
||||
define enter
|
||||
set mono_debug_insert_breakpoint = 1
|
||||
continue
|
||||
set *mono_debug_last_breakpoint_address = 0x90
|
||||
relocate
|
||||
frame
|
||||
</pre>
|
||||
|
||||
Btw. speaking of single stepping - you should use your debuggers <tt>next</tt> command,
|
||||
not its <tt>step</tt> command for single stepping unless you compiled the JIT without
|
||||
debugging support. The reason for this is that the JIT creates machine code which contains
|
||||
calls to JIT methods such as <tt>mono_object_new_wrapper</tt> at places where you don't
|
||||
expect them - so unless the JIT is compiled at least without line numbers, your debugger
|
||||
will enter such methods if you use <tt>step</tt> rather than <tt>next</tt>.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
* 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 --dwarf --debug Foo:Main ./Foo.exe
|
||||
Starting program: /home/martin/monocvs/mono/mono/jit/mono --dwarf --debug 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.
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
* 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 --dwarf-plus --debug Foo:Main ./Foo.exe
|
||||
Starting program: /home/martin/monocvs/mono/mono/jit/mono --dwarf-plus --debug 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>
|
||||
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
* Compilers for other languages
|
||||
|
||||
Here are some other free compilers for other languages that
|
||||
target .NET and should work with Mono with no problem:
|
||||
|
||||
* Oberon
|
||||
|
||||
This Oberon compiler is written in Oberon.NET (another self
|
||||
hosting compiler):
|
||||
|
||||
<a href="http://www.superin.formativ.net/mono/oberon/oberon.zip">http://www.superin.formativ.net/mono/oberon/oberon.zip</a>
|
||||
|
||||
* Component Pascal
|
||||
|
||||
The Component Pascal compiler: <a
|
||||
href="http://www2.fit.qut.edu.au/CompSci/PLAS/ComponentPascal">Home
|
||||
Page</a>, you can <a
|
||||
href="http://www2.fit.qut.edu.au/CompSci/PLAS/ComponentPascal/gpcp1.1.4-netRTM.zip">
|
||||
download it</a>
|
||||
@@ -120,8 +120,8 @@ export CPPFLAGS
|
||||
export LDFLAGS
|
||||
|
||||
# Make sure we build native w32, not cygwin
|
||||
CC="gcc -mno-cygwin"
|
||||
export CC
|
||||
#CC="gcc -mno-cygwin"
|
||||
#export CC
|
||||
|
||||
# --prefix is used to set the class library dir in mono, and it needs
|
||||
# to be in windows-native form. It also needs to have '\' turned into
|
||||
|
||||
+5
-4
@@ -60,6 +60,7 @@ function install_package() {
|
||||
tarfile=$1
|
||||
dirname=$2
|
||||
name=$3
|
||||
configure_options=$4
|
||||
|
||||
echo "Installing $name..."
|
||||
if [ ! -f $here/$tarfile ]; then
|
||||
@@ -70,7 +71,7 @@ function install_package() {
|
||||
if [ ! -d $here/$dirname ]; then
|
||||
# Build and install package
|
||||
tar xzf $here/$tarfile || exit -1
|
||||
(cd $here/$dirname; ./configure --prefix=$here/install || exit -1; make || exit -1; make install || exit -1)
|
||||
(cd $here/$dirname; ./configure --prefix=$here/install $configure_options || exit -1; make || exit -1; make install || exit -1)
|
||||
success=$?
|
||||
if [ $success -ne 0 ]; then
|
||||
echo "***** $name build failure. Run rm -rf $here/$dirname to have this script attempt to build $name again next time"
|
||||
@@ -120,19 +121,19 @@ export LDFLAGS
|
||||
# Grab pkg-config-0.8, glib-1.3.12 if necessary
|
||||
|
||||
if [ $install_pkgconfig = "yes" ]; then
|
||||
install_package pkgconfig-0.8.0.tar.gz pkgconfig-0.8.0 pkgconfig
|
||||
install_package pkgconfig-0.8.0.tar.gz pkgconfig-0.8.0 pkgconfig ""
|
||||
else
|
||||
echo "Not installing pkgconfig, you already seem to have it installed"
|
||||
fi
|
||||
|
||||
if [ $install_glib = "yes" ]; then
|
||||
install_package glib-1.3.13.tar.gz glib-1.3.13 glib
|
||||
install_package glib-1.3.13.tar.gz glib-1.3.13 glib ""
|
||||
else
|
||||
echo "Not installing glib, you already seem to have it installed"
|
||||
fi
|
||||
|
||||
if [ $install_libgc = "yes" ]; then
|
||||
install_package gc6.0.tar.gz gc6.0 libgc
|
||||
LIBS="-ldl" install_package gc6.0.tar.gz gc6.0 libgc "--enable-threads=pthreads"
|
||||
# make install didnt do the headers!
|
||||
mkdir -p $here/install/include/gc
|
||||
cp -r $here/gc6.0/include/* $here/install/include/gc
|
||||
|
||||
+53
-12
@@ -1,55 +1,96 @@
|
||||
* JIT Compiler
|
||||
|
||||
<a
|
||||
href="http://cui.unige.ch/OSG/publications/OO-articles/TechnicalReports/98/efficient.pdf">
|
||||
href="http://citeseer.nj.nec.com/vitek97efficient.html">
|
||||
Efficient Type Inclusion Tests: Jahn Vitek, R. Nigel Horspool, Andres
|
||||
Krall</a>
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/rd/2822939%2C410249%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/20094/http%253AzSzzSzwww.math.tau.ac.ilzSz%257EguyzSzjava-optzSzssa.pdf/cytron91efficiently.pdf">
|
||||
href="http://citeseer.nj.nec.com/cytron91efficiently.html">
|
||||
Efficiently Computing Static Single Assignment Form and the Control
|
||||
Dependence Graph: Ron Cytron, Jeanne Ferrante</a>
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/rd/14269422%2C217684%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/9476/http%253AzSzzSzwww.cs.ucsb.eduzSzconferenceszSzjava98zSzpaperszSzcacao.pdf/krall98monitors.pdf">
|
||||
Monitors and Exceptions - How to implement Java efficiently: Andreas Krall,
|
||||
Mark Probst</a>
|
||||
href="http://citeseer.nj.nec.com/193349.html">
|
||||
Practical Improvements to the Construction and Destruction of Static Single Assignment Form: Preston Briggs,
|
||||
Keith Cooper, Timothy Harvey, Taylor Simpson</a>
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/rd/78588775%2C217642%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/9476/http%253AzSzzSzwww.complang.tuwien.ac.atzSzandizSzpact_98.pdf/krall98efficient.pdf">
|
||||
href="http://citeseer.nj.nec.com/krall98efficient.html">
|
||||
Efficient JavaVM Just-in-Time Compilation: Andreas Krall</a>
|
||||
|
||||
<a
|
||||
href="http://www.complang.tuwien.ac.at/andi/scicom_01.ps">Java for
|
||||
href="http://citeseer.nj.nec.com/452617.html">Java for
|
||||
Large-Scale Scientific Computations: Andreas Krall, Phillip Thomsich</a>
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/rd/62076894%2C117522%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/642/ftp%253AzSzzSzftp.cs.princeton.eduzSzpubzSzlcczSzcontribzSziburg.pdf/fraser92engineering.pdf">
|
||||
href="http://citeseer.nj.nec.com/117522.html">
|
||||
Engineering Simple, Efficient Code Generator Generator: Christopher
|
||||
W. Fraser, David R. Hanson, Todd A. Proebsting</a>
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/rd/8408515%2C54698%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/815/http%253AzSzzSzcuiwww.unige.chzSzOSGzSzpeoplezSzjvitekzSzResourceszSzArchivezSzProebsting.pdf/proebsting92code.pdf">
|
||||
href="http://citeseer.nj.nec.com/proebsting92code.html">
|
||||
Code Generation Techniques: Todd Alan Proebsting</a>
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/74629.html">Fast,
|
||||
Effective Code Generation in a Just-In-Time Java Compiler: Ali-Reza
|
||||
Adl-Tabatabai Guei-Yuan Lueh, Vishesh M. Parikh, James M. Stichnoth...</a>
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/bodik00abcd.html">
|
||||
ABCD: Eliminating Array-Bounds Checks on Demand: Rastislav Bodik, Rajiv Gupta, Vivek Sarkar</a>
|
||||
|
||||
* Register Allocation
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/rd/28309937%2C283402%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/12458/http%253AzSzzSzwww.pdos.lcs.mit.eduzSzpaperszSztoplas-linearscan.pdf/poletto99linear.pdf">
|
||||
href="http://citeseer.nj.nec.com/poletto99linear.html">
|
||||
Linear Scan Register Allocation: Massimiliano Poletto, Vivek Sarkar</a>
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/rd/19916683%2C91122%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/468/http%253AzSzzSzwww.eecs.harvard.eduzSzhubezSzpaperszSzpldi98-binpack.pdf/traub98quality.pdf">
|
||||
href="http://citeseer.nj.nec.com/traub98quality.html">
|
||||
Quality and Speed in Linear-scan Register Allocation: Omri Traub, Glenn
|
||||
Holloway, Michael D. Smith</a>
|
||||
|
||||
* Loop Transformations
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/bacon93compiler.html">
|
||||
Compiler Transformations for High-Performance Computing: David Bacon</a>
|
||||
|
||||
* Interpreter
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/rd/62076894%2C470069%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/24640/http%253AzSzzSzwww.complang.tuwien.ac.atzSzpaperszSzertlzPz01.pdf/ertl01vmgen.pdf">
|
||||
href="http://citeseer.nj.nec.com/470069.html">
|
||||
vmgen-A Generator of Efficient Virtual Machine Interpreters: M. Anton
|
||||
Ertl, David Gregg, Andreas Krall, Bernd Paysan</a>
|
||||
|
||||
* Synchronization
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/krall98monitors.html">
|
||||
Monitors and Exceptions - How to implement Java efficiently: Andreas Krall,
|
||||
Mark Probst</a>
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/bacon98thin.html">
|
||||
Thin Locks: Featherweight Synchronization for Java: David Bacon</a>
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/278639.html">
|
||||
Featherweight Monitors with Bacon Bits: David Bacon</a>
|
||||
|
||||
* Garbage Collection
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/wilson92uniprocessor.html">
|
||||
Uniprocessor Garbage Collection Techniques: Paul Wilson</a>
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/41666.html">
|
||||
A Language-Independent Garbage Collector Toolkit: Richard Hudson, Eliot Moss, Amer Diwan, Christopher Weight</a>
|
||||
|
||||
<a
|
||||
href="http://citeseer.nj.nec.com/seligmann95incremental.html">
|
||||
Incremental Collection of Mature Objects: Richard Hudson, Eliot Moss</a>
|
||||
|
||||
@@ -1,246 +0,0 @@
|
||||
System.Object
|
||||
System.Exception
|
||||
System.ValueType
|
||||
System.Delegate
|
||||
System.MulticastDelegate
|
||||
System.Enum
|
||||
System.Activator
|
||||
System.ArgIterator
|
||||
System.__ComObject
|
||||
System.TypedReference
|
||||
System.Security.AllowPartiallyTrustedCallersAttribute
|
||||
System.Runtime.Serialization.Formatter
|
||||
System.Runtime.Serialization.FormatterConverter
|
||||
System.Runtime.Serialization.FormatterServices
|
||||
System.Runtime.Serialization.ObjectIDGenerator
|
||||
System.Runtime.Serialization.ObjectManager
|
||||
System.Reflection.ModuleResolveEventHandler
|
||||
System.Reflection.Pointer
|
||||
System.Globalization.CompareInfo
|
||||
System.Globalization.HebrewCalendar
|
||||
System.Globalization.HijriCalendar
|
||||
System.Globalization.JapaneseCalendar
|
||||
System.Globalization.KoreanCalendar
|
||||
System.Globalization.SortKey
|
||||
System.Globalization.StringInfo
|
||||
System.Globalization.TaiwanCalendar
|
||||
System.Globalization.TextElementEnumerator
|
||||
System.Globalization.TextInfo
|
||||
System.Globalization.ThaiBuddhistCalendar
|
||||
System.IO.IsolatedStorage.IsolatedStorageFile
|
||||
System.Reflection.Emit.MethodRental
|
||||
System.Runtime.CompilerServices.AccessedThroughPropertyAttribute
|
||||
System.Runtime.CompilerServices.CallConvCdecl
|
||||
System.Runtime.CompilerServices.CallConvStdcall
|
||||
System.Runtime.CompilerServices.CallConvThiscall
|
||||
System.Runtime.CompilerServices.CallConvFastcall
|
||||
System.Runtime.CompilerServices.CustomConstantAttribute
|
||||
System.Runtime.CompilerServices.DateTimeConstantAttribute
|
||||
System.Runtime.CompilerServices.DiscardableAttribute
|
||||
System.Runtime.CompilerServices.DecimalConstantAttribute
|
||||
System.Runtime.CompilerServices.CompilationRelaxationsAttribute
|
||||
System.Runtime.CompilerServices.CompilerGlobalScopeAttribute
|
||||
System.Runtime.CompilerServices.IDispatchConstantAttribute
|
||||
System.Runtime.CompilerServices.IsVolatile
|
||||
System.Runtime.CompilerServices.IUnknownConstantAttribute
|
||||
System.Runtime.CompilerServices.RequiredAttributeAttribute
|
||||
System.Runtime.InteropServices.ArrayWithOffset
|
||||
System.Runtime.InteropServices.DispIdAttribute
|
||||
System.Runtime.InteropServices.ClassInterfaceType
|
||||
System.Runtime.InteropServices.ClassInterfaceAttribute
|
||||
System.Runtime.InteropServices.ComVisibleAttribute
|
||||
System.Runtime.InteropServices.LCIDConversionAttribute
|
||||
System.Runtime.InteropServices.ComRegisterFunctionAttribute
|
||||
System.Runtime.InteropServices.ComUnregisterFunctionAttribute
|
||||
System.Runtime.InteropServices.ProgIdAttribute
|
||||
System.Runtime.InteropServices.ImportedFromTypeLibAttribute
|
||||
System.Runtime.InteropServices.IDispatchImplType
|
||||
System.Runtime.InteropServices.IDispatchImplAttribute
|
||||
System.Runtime.InteropServices.ComSourceInterfacesAttribute
|
||||
System.Runtime.InteropServices.ComConversionLossAttribute
|
||||
System.Runtime.InteropServices.TypeLibTypeFlags
|
||||
System.Runtime.InteropServices.TypeLibFuncFlags
|
||||
System.Runtime.InteropServices.TypeLibVarFlags
|
||||
System.Runtime.InteropServices.TypeLibTypeAttribute
|
||||
System.Runtime.InteropServices.TypeLibFuncAttribute
|
||||
System.Runtime.InteropServices.TypeLibVarAttribute
|
||||
System.Runtime.InteropServices.ComImportAttribute
|
||||
System.Runtime.InteropServices.PreserveSigAttribute
|
||||
System.Runtime.InteropServices.ComAliasNameAttribute
|
||||
System.Runtime.InteropServices.AutomationProxyAttribute
|
||||
System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute
|
||||
System.Runtime.InteropServices.CoClassAttribute
|
||||
System.Runtime.InteropServices.ComEventInterfaceAttribute
|
||||
System.Runtime.InteropServices.COMException
|
||||
System.Runtime.InteropServices.ComMemberType
|
||||
System.Runtime.InteropServices.CurrencyWrapper
|
||||
System.Runtime.InteropServices.DispatchWrapper
|
||||
System.Runtime.InteropServices.ErrorWrapper
|
||||
System.Runtime.InteropServices.ExtensibleClassFactory
|
||||
System.Runtime.InteropServices.HandleRef
|
||||
System.Runtime.InteropServices.InvalidComObjectException
|
||||
System.Runtime.InteropServices.InvalidOleVariantTypeException
|
||||
System.Runtime.InteropServices.TypeLibImporterFlags
|
||||
System.Runtime.InteropServices.ExporterEventKind
|
||||
System.Runtime.InteropServices.ITypeLibExporterNotifySink
|
||||
System.Runtime.InteropServices.ITypeLibConverter
|
||||
System.Runtime.InteropServices.MarshalDirectiveException
|
||||
System.Runtime.InteropServices.ObjectCreationDelegate
|
||||
System.Runtime.InteropServices.RuntimeEnvironment
|
||||
System.Runtime.InteropServices.RegistrationServices
|
||||
System.Runtime.InteropServices.SafeArrayRankMismatchException
|
||||
System.Runtime.InteropServices.SafeArrayTypeMismatchException
|
||||
System.Runtime.InteropServices.SEHException
|
||||
System.Runtime.InteropServices.TypeLibConverter
|
||||
System.Runtime.InteropServices.BIND_OPTS
|
||||
System.Runtime.InteropServices.UCOMIBindCtx
|
||||
System.Runtime.InteropServices.UCOMIConnectionPointContainer
|
||||
System.Runtime.InteropServices.UCOMIConnectionPoint
|
||||
System.Runtime.InteropServices.UCOMIEnumMoniker
|
||||
System.Runtime.InteropServices.CONNECTDATA
|
||||
System.Runtime.InteropServices.UCOMIEnumConnections
|
||||
System.Runtime.InteropServices.UCOMIEnumConnectionPoints
|
||||
System.Runtime.InteropServices.UCOMIEnumString
|
||||
System.Runtime.InteropServices.UCOMIEnumVARIANT
|
||||
System.Runtime.InteropServices.FILETIME
|
||||
System.Runtime.InteropServices.UCOMIMoniker
|
||||
System.Runtime.InteropServices.UCOMIPersistFile
|
||||
System.Runtime.InteropServices.UCOMIRunningObjectTable
|
||||
System.Runtime.InteropServices.STATSTG
|
||||
System.Runtime.InteropServices.UCOMIStream
|
||||
System.Runtime.InteropServices.DESCKIND
|
||||
System.Runtime.InteropServices.BINDPTR
|
||||
System.Runtime.InteropServices.UCOMITypeComp
|
||||
System.Runtime.InteropServices.TYPEKIND
|
||||
System.Runtime.InteropServices.TYPEFLAGS
|
||||
System.Runtime.InteropServices.IMPLTYPEFLAGS
|
||||
System.Runtime.InteropServices.TYPEATTR
|
||||
System.Runtime.InteropServices.FUNCDESC
|
||||
System.Runtime.InteropServices.IDLFLAG
|
||||
System.Runtime.InteropServices.IDLDESC
|
||||
System.Runtime.InteropServices.PARAMFLAG
|
||||
System.Runtime.InteropServices.PARAMDESC
|
||||
System.Runtime.InteropServices.TYPEDESC
|
||||
System.Runtime.InteropServices.ELEMDESC
|
||||
System.Runtime.InteropServices.VARDESC
|
||||
System.Runtime.InteropServices.DISPPARAMS
|
||||
System.Runtime.InteropServices.EXCEPINFO
|
||||
System.Runtime.InteropServices.FUNCKIND
|
||||
System.Runtime.InteropServices.INVOKEKIND
|
||||
System.Runtime.InteropServices.CALLCONV
|
||||
System.Runtime.InteropServices.FUNCFLAGS
|
||||
System.Runtime.InteropServices.VARFLAGS
|
||||
System.Runtime.InteropServices.UCOMITypeInfo
|
||||
System.Runtime.InteropServices.SYSKIND
|
||||
System.Runtime.InteropServices.LIBFLAGS
|
||||
System.Runtime.InteropServices.TYPELIBATTR
|
||||
System.Runtime.InteropServices.UCOMITypeLib
|
||||
System.Runtime.InteropServices.UnknownWrapper
|
||||
System.Runtime.Remoting.IObjectHandle
|
||||
System.Runtime.Remoting.IRemotingTypeInfo
|
||||
System.Runtime.Remoting.IChannelInfo
|
||||
System.Runtime.Remoting.IEnvoyInfo
|
||||
System.Runtime.Remoting.RemotingConfiguration
|
||||
System.Runtime.Remoting.TypeEntry
|
||||
System.Runtime.Remoting.ActivatedClientTypeEntry
|
||||
System.Runtime.Remoting.ActivatedServiceTypeEntry
|
||||
System.Runtime.Remoting.WellKnownClientTypeEntry
|
||||
System.Runtime.Remoting.WellKnownServiceTypeEntry
|
||||
System.Runtime.Remoting.RemotingException
|
||||
System.Runtime.Remoting.ServerException
|
||||
System.Runtime.Remoting.RemotingTimeoutException
|
||||
System.Runtime.Remoting.RemotingServices
|
||||
System.Runtime.Remoting.InternalRemotingServices
|
||||
System.Runtime.Remoting.SoapServices
|
||||
System.Runtime.Remoting.Activation.UrlAttribute
|
||||
System.Runtime.Remoting.Messaging.IMessageSink
|
||||
System.Runtime.Remoting.Messaging.AsyncResult
|
||||
System.Runtime.Remoting.Messaging.CallContext
|
||||
System.Runtime.Remoting.Messaging.ILogicalThreadAffinative
|
||||
System.Runtime.Remoting.Messaging.InternalMessageWrapper
|
||||
System.Runtime.Remoting.Messaging.IMethodCallMessage
|
||||
System.Runtime.Remoting.Messaging.MethodCallMessageWrapper
|
||||
System.Runtime.Remoting.Messaging.HeaderHandler
|
||||
System.Runtime.Remoting.Messaging.IMessageCtrl
|
||||
System.Runtime.Remoting.Messaging.IRemotingFormatter
|
||||
System.Runtime.Remoting.Messaging.ReturnMessage
|
||||
System.Runtime.Remoting.Messaging.MethodCall
|
||||
System.Runtime.Remoting.Messaging.ConstructionCall
|
||||
System.Runtime.Remoting.Messaging.MethodResponse
|
||||
System.Runtime.Remoting.Messaging.ConstructionResponse
|
||||
System.Runtime.Remoting.Messaging.MethodReturnMessageWrapper
|
||||
System.Runtime.Remoting.Messaging.OneWayAttribute
|
||||
System.Runtime.Remoting.Messaging.MessageSurrogateFilter
|
||||
System.Runtime.Remoting.Messaging.RemotingSurrogateSelector
|
||||
System.Runtime.Remoting.Contexts.CrossContextDelegate
|
||||
System.Runtime.Remoting.Contexts.ContextProperty
|
||||
System.Runtime.Remoting.Contexts.IContextPropertyActivator
|
||||
System.Runtime.Remoting.Contexts.IContributeClientContextSink
|
||||
System.Runtime.Remoting.Contexts.IContributeDynamicSink
|
||||
System.Runtime.Remoting.Contexts.IContributeEnvoySink
|
||||
System.Runtime.Remoting.Contexts.IContributeObjectSink
|
||||
System.Runtime.Remoting.Contexts.IContributeServerContextSink
|
||||
System.Runtime.Serialization.Formatters.InternalRM
|
||||
System.Runtime.Serialization.Formatters.InternalST
|
||||
System.Runtime.Serialization.Formatters.SoapMessage
|
||||
System.Runtime.Serialization.Formatters.SoapFault
|
||||
System.Runtime.Serialization.Formatters.ServerFault
|
||||
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
System.Security.Cryptography.CryptoConfig
|
||||
System.Security.Cryptography.KeyedHashAlgorithm
|
||||
System.Security.Cryptography.HMACSHA1
|
||||
System.Security.Cryptography.MACTripleDES
|
||||
System.Security.Cryptography.MaskGenerationMethod
|
||||
System.Security.Cryptography.PasswordDeriveBytes
|
||||
System.Security.Cryptography.PKCS1MaskGenerationMethod
|
||||
System.Security.Cryptography.RC2
|
||||
System.Security.Cryptography.RC2CryptoServiceProvider
|
||||
System.Security.Cryptography.RSACryptoServiceProvider
|
||||
System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter
|
||||
System.Security.Cryptography.RSAOAEPKeyExchangeFormatter
|
||||
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter
|
||||
System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter
|
||||
System.Security.Cryptography.RSAPKCS1SignatureDeformatter
|
||||
System.Security.Cryptography.RSAPKCS1SignatureFormatter
|
||||
System.Security.Cryptography.SHA1Managed
|
||||
System.Security.Cryptography.TripleDES
|
||||
System.Security.Cryptography.TripleDESCryptoServiceProvider
|
||||
System.Security.Permissions.EnvironmentPermission
|
||||
System.Security.Permissions.FileDialogPermission
|
||||
System.Security.Permissions.IsolatedStorageFilePermission
|
||||
System.Security.Permissions.PrincipalPermissionAttribute
|
||||
System.Security.Permissions.SecurityPermissionAttribute
|
||||
System.Security.Permissions.PublisherIdentityPermissionAttribute
|
||||
System.Security.Permissions.PublisherIdentityPermission
|
||||
System.Security.Permissions.ReflectionPermission
|
||||
System.Security.Permissions.RegistryPermission
|
||||
System.Security.Permissions.PrincipalPermission
|
||||
System.Security.Permissions.SiteIdentityPermission
|
||||
System.Security.Permissions.StrongNameIdentityPermission
|
||||
System.Security.Permissions.StrongNamePublicKeyBlob
|
||||
System.Security.Permissions.UIPermission
|
||||
System.Security.Permissions.UrlIdentityPermission
|
||||
System.Security.Permissions.ZoneIdentityPermission
|
||||
System.Security.Policy.ApplicationDirectory
|
||||
System.Security.Policy.ApplicationDirectoryMembershipCondition
|
||||
System.Security.Policy.FirstMatchCodeGroup
|
||||
System.Security.Policy.Hash
|
||||
System.Security.Policy.HashMembershipCondition
|
||||
System.Security.Policy.NetCodeGroup
|
||||
System.Security.Policy.PermissionRequestEvidence
|
||||
System.Security.Policy.Publisher
|
||||
System.Security.Policy.PublisherMembershipCondition
|
||||
System.Security.Policy.Site
|
||||
System.Security.Policy.SiteMembershipCondition
|
||||
System.Security.Policy.StrongName
|
||||
System.Security.Policy.StrongNameMembershipCondition
|
||||
System.Security.Policy.UnionCodeGroup
|
||||
System.Security.Policy.Url
|
||||
System.Security.Policy.UrlMembershipCondition
|
||||
System.Security.Policy.Zone
|
||||
System.Security.Policy.ZoneMembershipCondition
|
||||
System.Security.Principal.WindowsIdentity
|
||||
System.Security.Principal.WindowsImpersonationContext
|
||||
System.Security.Principal.WindowsPrincipal
|
||||
System.Threading.CompressedStack
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
* Plans
|
||||
|
||||
Here we are tracking some plans to particular pieces of
|
||||
technology that are part of Mono.
|
||||
|
||||
This is just a repository of information that is handy for
|
||||
contributors.
|
||||
|
||||
Currently you can read our plans for <a
|
||||
href="ado-net.html">ADO.NET</a>, <a
|
||||
href="asp-net">ASP.NET</a>, <a href="java.html">Java</a> and
|
||||
<a href="winforms.html">WinForms</a>.
|
||||
|
||||
|
||||
|
||||
+34
-2
@@ -108,6 +108,10 @@
|
||||
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
|
||||
Develop:</a> an IDE for the C# language written in C#.
|
||||
|
||||
* <a
|
||||
href="http://www.improve-technologies.com/alpha/esharp/">Eclipse
|
||||
Plugin for C#</a>
|
||||
|
||||
* <a
|
||||
href="http://janet-js.sourceforge.net/">Janet:</a>
|
||||
an implemention of ECMAScript (the standarized
|
||||
@@ -151,6 +155,34 @@
|
||||
* <A
|
||||
href="http://developer.gnome.org/arch/">Architecture Overview</a>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
** Assembly Language Manuals online
|
||||
|
||||
<ul>
|
||||
* <a href="http://www.agner.org/assem/#optimize">
|
||||
Pentium optimization tutorial</a> by Agner Fog
|
||||
|
||||
* <a href="http://webster.cs.ucr.edu/">
|
||||
Art of Assembly</a> (x86 only)
|
||||
|
||||
* Documentation for various CPUs
|
||||
(<a href="http://www.mit.edu/afs/sipb/contrib/doc/specs/ic/cpu/">
|
||||
x86, IA64, MIPS, ARM, Alpha</a>)
|
||||
|
||||
* <a href="http://www.heyrick.co.uk/assembler/">
|
||||
ARM Assembler</a> tutorial
|
||||
|
||||
* PowerPC
|
||||
<a href="http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF7785256996007558C6">
|
||||
Compiler Writer's Guide</a>
|
||||
|
||||
* <a href="http://www.lightsoft.co.uk/Fantasm/Beginners/begin1.html">
|
||||
Beginners Guide to PowerPC Assembler</a>
|
||||
</ul>
|
||||
|
||||
** Win32
|
||||
|
||||
<ul>
|
||||
* Win32 <a href="http://www.jorgon.freeserve.co.uk/ExceptFrame.htm">
|
||||
Structured Exception Handling (SEH)</a> internals (x86 specific)
|
||||
</ul>
|
||||
+38
-10
@@ -16,14 +16,8 @@
|
||||
easy-to-port runtime engine.
|
||||
</ul>
|
||||
|
||||
Currently both runtimes are missing garbage collection. We
|
||||
are planning on using the ORP GC engine and deploy it by
|
||||
middle January.
|
||||
|
||||
* COM and XPCOM
|
||||
|
||||
We plan on adding support for XPCOM on Unix and COM on Microsoft
|
||||
Windows later in our development process.
|
||||
Currently we are using the Bohem conservative garbage
|
||||
collector, but we working on incorporating the ORP GC engine.
|
||||
|
||||
** Executing MSIL/CIL images
|
||||
|
||||
@@ -60,18 +54,34 @@
|
||||
layout the code to support non-IA32 architectures. Our work
|
||||
will be focused on getting a IA32 version running first.
|
||||
|
||||
The JIT engine should work on Linux and Win32, although you
|
||||
The JIT engine works on Linux and Win32, although you
|
||||
will need to install the CygWin32 development tools to get a
|
||||
Unix-like compilation environment (mostly we use GNU make in
|
||||
a few of the makefiles).
|
||||
|
||||
** JIT Engine (<b>updated, March 26th, 2002</b>)
|
||||
** JIT Engine (<b>updated, April 21, 2002</b>)
|
||||
|
||||
The JIT engine uses a code-generator generator approach for
|
||||
compilation. Given the properties of CIL byte codes, we can
|
||||
take full advantage of a real instruction selector for our
|
||||
code generator.
|
||||
|
||||
The JIT engine implements a number of optimizations:
|
||||
|
||||
<ul>
|
||||
* Opcode cost estimates (our architecture allows
|
||||
us to generate different code paths depending
|
||||
on the target CPU dynamically).
|
||||
|
||||
* Inlining.
|
||||
|
||||
* Constant folding.
|
||||
|
||||
Although compilers typically do
|
||||
constant folding, the combination of inlining with
|
||||
constant folding gives some very good results.
|
||||
</ul>
|
||||
|
||||
There are a couple of books that deal with this technique: "A
|
||||
Retargetable C Compiler" and "Advanced Compiler Design and
|
||||
Implementation" are good references. You can also get a
|
||||
@@ -165,3 +175,21 @@
|
||||
|
||||
Initially we used libffi, but it was fairly slow, so we have
|
||||
reused parts of the JIT work to create efficient PInvoke trampolines.
|
||||
|
||||
** Remoting
|
||||
|
||||
Mono has support for remoting and proxy objects, just like
|
||||
.NET does. The runtime provides these facilities.
|
||||
|
||||
** Porting
|
||||
|
||||
If you are interested in porting the Mono runtime to other
|
||||
platforms, you might find the pre-compiled <a
|
||||
href="archive/mono-tests.tar.gz">Mono regression test
|
||||
suite</a> useful to debug your implementation.
|
||||
|
||||
* COM and XPCOM
|
||||
|
||||
We plan on adding support for XPCOM on Unix and COM on Microsoft
|
||||
Windows later in our development process.
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
2,System.Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,System.Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,C# Compiler,c-sharp.html,c-sharp.src
|
||||
1,Debugging,jit-debug.html,jit-debug.src
|
||||
2,Example 1,jit-debug-sample.html,jit-debug-sample.src
|
||||
2,Example 2,jit-debug-sample2.html,jit-debug-sample2.src
|
||||
1,Status,status.html,status.src
|
||||
0,Download,download.html,download.src
|
||||
1,CVS access,ccvs.html,ccvs.src
|
||||
@@ -22,10 +25,16 @@
|
||||
1,Test Suite,testing.html,testing.src
|
||||
1,Tools,tools.html,tools.src
|
||||
1,Porting,porting.html,porting.src
|
||||
0,Plans,plans.html,plans.src
|
||||
1,ADO.NET,ado-net.html,ado-net.src
|
||||
1,ASP.NET,asp-net.html,asp-net.src
|
||||
1,Java,java.html,java.src
|
||||
1,Windows.Forms,winforms.html,winforms.src
|
||||
0,Resources,resources.html,resources.src
|
||||
1,Mailing Lists,mailing-lists.html,mailing-lists.src
|
||||
1,Ideas,ideas.html,ideas.src
|
||||
1,Passport,passport.html,passport.src
|
||||
1,Books,books.html,books.src
|
||||
1,Papers,papers.html,papers.src
|
||||
1,Languages,languages.html,languages.src
|
||||
0,Contact,contact.html,contact.src
|
||||
@@ -123,6 +123,8 @@
|
||||
.s_ .r_,
|
||||
.s_ .x,
|
||||
.s_ .x_,
|
||||
.s_ .i,
|
||||
.s_ .i_,
|
||||
|
||||
.e_ .r,
|
||||
.e_ .r_,
|
||||
|
||||
@@ -61,24 +61,20 @@ function getChildrenByTagName (elt, strTag)
|
||||
function viewAll (elt, dictTypes)
|
||||
{
|
||||
var fView = false;
|
||||
var rgElts = getChildrenByTagName (elt, 'DIV');
|
||||
var cElts = rgElts.length;
|
||||
if (cElts == 0)
|
||||
var rgImages = getChildrenByTagName (elt, 'IMG');
|
||||
var cImages = rgImages.length;
|
||||
for (var iImage = 0; iImage < cImages; iImage++)
|
||||
{
|
||||
var rgImages = getChildrenByTagName (elt, 'IMG');
|
||||
var cImages = rgImages.length;
|
||||
for (var iImage = 0; iImage < cImages; iImage++)
|
||||
var strImage = trimSrc (rgImages [iImage].src);
|
||||
if (dictTypes [strImage])
|
||||
{
|
||||
var image = rgImages [iImage];
|
||||
var strImage = trimSrc (rgImages [iImage].src);
|
||||
if (dictTypes [strImage])
|
||||
{
|
||||
fView = true;
|
||||
break;
|
||||
}
|
||||
fView = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
var rgElts = getChildrenByTagName (elt, 'DIV');
|
||||
var cElts = rgElts.length;
|
||||
if (cElts != 0)
|
||||
{
|
||||
var iElt;
|
||||
for (iElt = 0; iElt < cElts; iElt ++)
|
||||
@@ -322,7 +318,7 @@ function filterTree ()
|
||||
dictTypes ['se'] = true;
|
||||
if (eltExtra.checked)
|
||||
dictTypes ['sx'] = true;
|
||||
dictTypes ['sc'] = true;
|
||||
// dictTypes ['sc'] = true;
|
||||
|
||||
viewAll (document.getElementById ('ROOT'), dictTypes);
|
||||
}
|
||||
|
||||
+14
-4
@@ -3,11 +3,13 @@ CSCRIPT = $(SYSTEMROOT)/system32/cscript.exe
|
||||
CORCOMPARE=../../../mcs/tools/corcompare
|
||||
|
||||
OBJECTS= \
|
||||
deploy/ado-net.html \
|
||||
deploy/anoncvs.html \
|
||||
deploy/asp-net.html \
|
||||
deploy/books.html \
|
||||
deploy/contributing.html \
|
||||
deploy/class-status.html \
|
||||
deploy/class-status-corlib.html \
|
||||
deploy/class-status-System.html \
|
||||
deploy/class-status-System.Xml.html \
|
||||
deploy/class-status-System.Data.html \
|
||||
deploy/class-status-System.Web.html \
|
||||
@@ -22,19 +24,27 @@ OBJECTS= \
|
||||
deploy/gcc-frontend.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/monodoc-xml.html \
|
||||
deploy/papers.html \
|
||||
deploy/passport.html \
|
||||
deploy/plans.html \
|
||||
deploy/porting.html \
|
||||
deploy/rationale.html \
|
||||
deploy/resources.html \
|
||||
deploy/roadmap.html \
|
||||
deploy/runtime.html \
|
||||
deploy/status.html \
|
||||
deploy/testing.html \
|
||||
deploy/porting.html \
|
||||
deploy/tools.html \
|
||||
deploy/books.html \
|
||||
deploy/papers.html
|
||||
deploy/winforms.html
|
||||
|
||||
# deploy/class-status-System.html \
|
||||
|
||||
NON_HTML_SOURCES= \
|
||||
../mono-build.sh \
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
* System.Windows.Forms
|
||||
|
||||
System.Windows.Forms eventually will support multiple
|
||||
toolkits. Ximian will be delivering a product that will allow
|
||||
for System.Windows.Forms applications to integrate with GNOME
|
||||
through Gtk and MacOS X using Cocoa.
|
||||
|
||||
There are no current plans to support embedded devices, but
|
||||
Gtk/FrameBuffer is an option. If you have suggestions or
|
||||
recommendations, please let us <a
|
||||
href="mailto:[email protected]">let us know</a>
|
||||
|
||||
* Contributing
|
||||
|
||||
Currently Ximian developers are busy making our JIT engine
|
||||
feature complete, and dealing with the low-level details of
|
||||
the Mono runtime.
|
||||
|
||||
If you are interested in contributing, you can start stubbing
|
||||
out classes and providing enumerations. That will help us
|
||||
significantly when we start working on the actual bindings.
|
||||
|
||||
Christian Meyer is currently organizing this effort.
|
||||
|
||||
* System.Drawing
|
||||
|
||||
Using existing libraries to implement some of the functionality required
|
||||
|
||||
<ul>
|
||||
* gdk-pixbuf is a generic image loader that loads an image
|
||||
and leaves it into an RGB buffer. It hides all the details
|
||||
about what image file format is being loaded.
|
||||
|
||||
* Libart is a general framework for rendering RGB/RGBA
|
||||
buffers into RGB buffers and rendering postscript-like paths into
|
||||
RGB/RGBA buffers.
|
||||
</ul>
|
||||
|
||||
We want to use gdk-pixbuf as the image loader for the image
|
||||
classes, and then we need operations to render that into the
|
||||
windowing system (Gtk+, MacOS, etc). But notice how there is
|
||||
very little dependnecies in Gdk-pixbuf on gtk, and libart has
|
||||
none.
|
||||
|
||||
They are pretty independent from a windowing system
|
||||
(gdk-pixbuf comes with some "helper" routines for rendering
|
||||
data into a pixmap and to load pixmaps into RGB buffers).
|
||||
|
||||
A few things to keep in mind:
|
||||
|
||||
<ul>
|
||||
|
||||
* gdk-pixbuf can be used to load images for Gtk+,
|
||||
MacOS X and Windows, it should be pretty portable,
|
||||
although we might need in the future to back-port
|
||||
some new features from Gtk head.
|
||||
|
||||
* Libart is probably only going to be used with X11,
|
||||
as the MacOS X provides the same features in Quartz,
|
||||
and Win32 *probably* has that in GDI+. If not, we
|
||||
should use libart in Win32 as well (or for older
|
||||
Windows systems).
|
||||
</ul>
|
||||
|
||||
* Directory Layout
|
||||
|
||||
System.Drawing (assembly directory)
|
||||
System.Drawing.Blah
|
||||
Common code for "Blah"
|
||||
Stubs for "Blah" to ease ports.
|
||||
|
||||
Gtk
|
||||
System.Drawing.Blah.
|
||||
Gtk ports of "System.Drawing.Blah"
|
||||
MacOS
|
||||
System.Drawing.Blah
|
||||
MacOS ports of "System.Drawing.Blah"
|
||||
Win32
|
||||
System.Drawing.Blah
|
||||
Win32 ports of "System.Drawing.Blah"
|
||||
|
||||
Then we use nant targets to include/exclude the right set of
|
||||
files to create the assembly.
|
||||
|
||||
* Open questions:
|
||||
|
||||
I believe that the graphics contexts that are used to render
|
||||
can accept either libart-like rendering operations and
|
||||
X11-like rendering operations. This complicates matters, but
|
||||
I am not sure. Someone needs to investigate this.
|
||||
@@ -0,0 +1,3 @@
|
||||
EXTRA_DIST = gc-issues jit-thoughts object-layout unmanaged-calls \
|
||||
exceptions jit-trampolines stack-alignment
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
* GC issues you need to be careful about when hacking on the mono runtime.
|
||||
|
||||
mono currently uses the Boehm garbage collection library. This is a conservative
|
||||
GC package: this means that the memory is searched for possible memory references
|
||||
to chunks allocated with the GC. Not all the memory is searched, but only the memory
|
||||
allocated with the GC itself (unless you use the 'atomic' variant of the allocation
|
||||
routines), the stack and global variables. Also, if the last reference to an object
|
||||
is stored in an area of themory that is not searched, the object may be freed resulting
|
||||
in memory corruption ind segfaults.
|
||||
|
||||
In particular, memory allocated with system's malloc() is not searched, so you need to be
|
||||
careful NOT to store object references in memory allocated with malloc() (unless you are sure
|
||||
that the object reference will be live at the same time in some other area under the control
|
||||
of the GC (on the stack or in a global variable, for example). Since g_malloc()
|
||||
ultimately calls system malloc() the data structures in GLib are not safe to
|
||||
use to store object references.
|
||||
|
||||
Occasionally, you'll need to store some object reference from C code: in this case,
|
||||
you must make sure that the store location is searched by the GC. You can safely
|
||||
use thread local storage areas, global variables, stack variables. If you need a more
|
||||
complicated data structure, you can use a hash table: MonoGHashTable.
|
||||
This hash table has the same interface as GHashTable from GLib, just stick the "mono_"
|
||||
prefix in function calls and the "Mono" prefix in the hash table type name.
|
||||
This hash table ensures that object references stored in it are tracked by the GC, as long
|
||||
as the pointer to the hash is tracked itself.
|
||||
|
||||
Other data structures that are allocated with the GC and are safe to use to store pointers
|
||||
to GC-allocated memory, are MonoDomain (keeps track of many domain specfic objects)
|
||||
and MonoVTable (referenced by MonoDomain: keeps track of the static data of a type
|
||||
since that can hold references to objects).
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
|
||||
* How to map C# types for use in the C implementation of internal calls
|
||||
|
||||
C# type C type
|
||||
char gunichar2
|
||||
bool MonoBoolean
|
||||
sbyte signed char
|
||||
byte guchar
|
||||
short gint16
|
||||
ushort guint16
|
||||
int gint32
|
||||
uint guint32
|
||||
long gint64
|
||||
ulong guint64
|
||||
IntPtr/UIntPtr gpointer
|
||||
object MonoObject*
|
||||
string MonoString*
|
||||
|
||||
For ref and out paramaters you'll use the corresponding pointer type.
|
||||
Arrays of any type must be described with a MonoArray* and the elements
|
||||
must be accessed with the mono_array_* macros.
|
||||
Any other type that has a matching C structure representation, should use
|
||||
a pointer to the struct instead of a generic MonoObject pointer.
|
||||
|
||||
Instance methods that are internal calls will receive as first argument
|
||||
the instance object, so you must account for it in the C method signature:
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
public extern override int GetHashCode ();
|
||||
|
||||
becaomes:
|
||||
|
||||
gint32 ves_icall_System_String_GetHashCode (MonoString *this);
|
||||
|
||||
|
||||
|
||||
* How to hook internal calls with the runtime
|
||||
|
||||
Once you require an internal call in corlib, you need to create a C
|
||||
implementation for it and register it in a static table in metadata/icall.c.
|
||||
Add an entry in the table like:
|
||||
|
||||
"System.String::GetHashCode", ves_icall_System_String_GetHashCode,
|
||||
|
||||
Note that you need to include the full namespace.name of the class.
|
||||
If there are overloaded methods, you need also to specify the signature
|
||||
of _all_ of them:
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
public extern override void DoSomething ();
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
public extern override void DoSomething (bool useful);
|
||||
|
||||
should be mapped with:
|
||||
|
||||
"Namespace.ClassName::DoSomething()", ves_icall_Namespace_ClassName_DoSomething,
|
||||
"Namespace.ClassName::DoSomething(bool)", ves_icall_Namespace_ClassName_DoSomething_bool,
|
||||
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
How to use the debug support in the jit.
|
||||
----------------------------------------
|
||||
|
||||
You need to run mono inside gdb. The following command line swicthes
|
||||
are available:
|
||||
|
||||
--stabs
|
||||
--dwarf
|
||||
--debug className:methodName
|
||||
|
||||
--stabs will create an assemblyname-stabs.s file for each assembly the
|
||||
CLR program uses. Note that to properly display source code lines,
|
||||
you need to disassemble the CLR executables with monodis before running
|
||||
mono. Each IL assembly file needs to have the name <assemblyname>.il.
|
||||
|
||||
--dwarf will create an assemblyname-dwarf.s file for each assembly the
|
||||
CLR program uses. Note that to properly display source code lines,
|
||||
you need to disassemble the CLR executables with monodis before running
|
||||
mono. Each IL assembly file needs to have the name <assemblyname>.il.
|
||||
|
||||
--debug className:methodName will insert a breakpoin at the beginning of
|
||||
methodName's code, so that control is trasnfered to the debugger as soon
|
||||
as it is entered. You may use this switch multiple times.
|
||||
|
||||
So, suppose you use the --debug switch, or hit a segfault inside a
|
||||
jitted method. In a shell you need to compile the stab/dwarf information
|
||||
created with the --stabs or --dwarf option with the assembler:
|
||||
|
||||
as assemblyname-stabs.s -o assemblyname-stabs.o
|
||||
|
||||
or
|
||||
|
||||
as assemblyname-dwarf.s -o assemblyname-dwarf.o
|
||||
|
||||
Now, inside gdb, you can load the debug information with:
|
||||
|
||||
add-symbol-file assemblyname-stabs.o 0
|
||||
|
||||
or
|
||||
|
||||
add-symbol-file assemblyname-dwarf.o 0
|
||||
|
||||
And at this point the debugger should be able to print a correct
|
||||
backtrace, you should be able to inspect method parameters and local
|
||||
variables, disassemble methods and step through the code.
|
||||
|
||||
Using the DWARF 2 debugging format (with the --dwarf) argument is the
|
||||
recommended one since it supports source files with more than 65.536
|
||||
lines (for instance corlib.il) and you'll also get much better type
|
||||
support with it. [FIXME: I'm still working on this, but it's already
|
||||
making good progress. Martin].
|
||||
|
||||
However, some systems or debuggers may not support the DWARF 2 format,
|
||||
in this case just use stabs.
|
||||
|
||||
Note that apparently you can't unload a symbol file from gdb, so you
|
||||
need to restart it if you restart the program to debug.
|
||||
|
||||
Name mangling.
|
||||
-------------
|
||||
|
||||
Currently CLR methods are exposed as C functions, so, if they are not
|
||||
static, their first argument will be called 'this'.
|
||||
Method names are mangled in the following way: a long name is created
|
||||
concatting namespace, class name and method name. '.' chars are changed
|
||||
to underscaore '_'. To allow for overloading, the address of the
|
||||
MonoMethod from wich the method was created is appended to the end of
|
||||
the name (i's also handy since you can use the address in gdb to inspect
|
||||
the MonoMethod).
|
||||
|
||||
[This will change with DWARF 2 since this format is capable of storing
|
||||
the full type name as it's seen by the programming language and doesn't
|
||||
need any mangling. Martin]
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
man_MANS = mcs.1 mono.1
|
||||
man_MANS = mcs.1 mono.1 monostyle.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
+7
-1
@@ -11,7 +11,7 @@ mono \- Mono ECMA-CLI Just in Time compiler.
|
||||
.PP
|
||||
.B mono
|
||||
[\-\-help] [\-d] [\-\-debug-asm] [\-\-debug-forest] [\-\-trace-calls]
|
||||
[\-\-stabs] [\-\-compile cname] [\-\-ncompile num] [\-\-debug]
|
||||
[\-\-stabs] [\-\-compile cname] [\-\-ncompile num] [\-\-debug] [\-\-noinline] [\-\-profile]
|
||||
program.exe [arguments...]
|
||||
.SH DESCRIPTION
|
||||
The \fImono\fP program is a Just in Time compiler for ECMA CLI byte
|
||||
@@ -68,6 +68,12 @@ Compiles the method on the given class (namespace.name:methodname).
|
||||
.I "--ncompile"
|
||||
Compiles the method a number of times. If no argument is specified,
|
||||
the method will be compiled a thousand times.
|
||||
.TP
|
||||
.I "--noinline"
|
||||
Disables the code inliner.
|
||||
.TP
|
||||
.I "--profile"
|
||||
Collect profiling information and dump it at the end of the process.
|
||||
.SH FILES
|
||||
Assemblies are lodaed from the installation lib directory. If you set
|
||||
`prefix' to /usr, the assemblies will be located in /usr/lib.
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
.\"
|
||||
.\" monostyle manual page.
|
||||
.\" (C) Adam Treat ([email protected])
|
||||
.\"
|
||||
.TH monostyle 1
|
||||
.SH NAME
|
||||
monostyle \- Mono's C# code beautifier.
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B monostyle
|
||||
-f file.cs -l <true|false> > output.cs
|
||||
.SH DESCRIPTION
|
||||
monostyle will parse a C# source code file and correct brace formatting
|
||||
reflective of the Mono Project's coding standard. To use: invoke monostyle
|
||||
by passing a C# source code file with '-f file.cs' and specify whether to
|
||||
use linespacing with '-l <true|false>. To output to a file just redirect
|
||||
with '>'.
|
||||
.PP
|
||||
Mono's Coding Standard
|
||||
.PP
|
||||
* The opening brace following a namespace, class, struct, enum, property or
|
||||
flow control unit should be at the end of the declaration line.
|
||||
.PP
|
||||
* The opening brace for a function should be on the line following the function.
|
||||
.PP
|
||||
* Please use white space around operators and a space between function names
|
||||
and their parameters.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.I \-\-file
|
||||
The csharp source file to parse.
|
||||
.TP
|
||||
.I \-\-line
|
||||
Specifies wether to use line spacing.
|
||||
.PP
|
||||
.SH AUTHORS
|
||||
Adam Treat ([email protected])
|
||||
.PP
|
||||
.SH LICENSE
|
||||
MonoStyle is released under the terms of the GNU GPL.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
mono(1), mint(1)
|
||||
@@ -2,6 +2,7 @@ C# Compiler:
|
||||
Miguel de Icaza ([email protected])
|
||||
|
||||
Class Libraries:
|
||||
Patrik Torstensson <[email protected]>
|
||||
Gaurav Vaish <[email protected]>
|
||||
Jeff Stedfast ([email protected])
|
||||
Joe Shaw ([email protected])
|
||||
|
||||
@@ -35,36 +35,85 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
public int WriteLabel ()
|
||||
{
|
||||
int index = GetNextLabelIndex ();
|
||||
int index = ++next_anon_label_idx;
|
||||
|
||||
WriteLabel (index);
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
public string GetLabelName (int index)
|
||||
{
|
||||
return index.ToString ();
|
||||
}
|
||||
|
||||
public void WriteLabel (int index)
|
||||
{
|
||||
WriteLabel (GetLabelName (index));
|
||||
char[] output = { '.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
|
||||
':', '\n' };
|
||||
|
||||
unchecked {
|
||||
int value = (int) index;
|
||||
output [3] = hex [(value & 0xf00000) >> 20];
|
||||
output [4] = hex [(value & 0x0f0000) >> 16];
|
||||
output [5] = hex [(value & 0x00f000) >> 12];
|
||||
output [6] = hex [(value & 0x000f00) >> 8];
|
||||
output [7] = hex [(value & 0x0000f0) >> 4];
|
||||
output [8] = hex [(value & 0x00000f)];
|
||||
}
|
||||
|
||||
writer.Write (output, 0, output.Length);
|
||||
}
|
||||
|
||||
private static readonly char[] hex = { '0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
|
||||
|
||||
public void WriteUInt8 (bool value)
|
||||
{
|
||||
writer.WriteLine ("\t.byte\t\t" + (value ? 1 : 0));
|
||||
WriteUInt8 (value ? 1 : 0);
|
||||
}
|
||||
|
||||
public void WriteUInt8 (int value)
|
||||
{
|
||||
writer.WriteLine ("\t.byte\t\t" + value);
|
||||
char[] output = { '\t', '.', 'b', 'y', 't', 'e', '\t', '\t',
|
||||
'0', 'x', '\0', '\0',
|
||||
'\n' };
|
||||
|
||||
unchecked {
|
||||
output [10] = hex [(value & 0xf0) >> 4];
|
||||
output [11] = hex [value & 0x0f];
|
||||
}
|
||||
|
||||
writer.Write (output, 0, output.Length);
|
||||
}
|
||||
|
||||
public void WriteInt8 (int value)
|
||||
{
|
||||
writer.WriteLine ("\t.byte\t\t" + value);
|
||||
char[] output = { '\t', '.', 'b', 'y', 't', 'e', '\t', '\t',
|
||||
'0', 'x', '\0', '\0',
|
||||
'\n' };
|
||||
|
||||
unchecked {
|
||||
uint uvalue = (uint) value;
|
||||
output [10] = hex [(uvalue & 0xf0) >> 4];
|
||||
output [11] = hex [uvalue & 0x0f];
|
||||
}
|
||||
|
||||
writer.Write (output, 0, output.Length);
|
||||
}
|
||||
|
||||
public void Write2Bytes (int a, int b)
|
||||
{
|
||||
char[] output = { '\t', '.', 'b', 'y', 't', 'e', '\t', '\t',
|
||||
'0', 'x', '\0', '\0', ',', ' ',
|
||||
'0', 'x', '\0', '\0',
|
||||
'\n' };
|
||||
|
||||
unchecked {
|
||||
uint ua = (uint) a;
|
||||
uint ub = (uint) b;
|
||||
output [10] = hex [(ua & 0xf0) >> 4];
|
||||
output [11] = hex [ua & 0x0f];
|
||||
output [16] = hex [(ub & 0xf0) >> 4];
|
||||
output [17] = hex [ub & 0x0f];
|
||||
}
|
||||
|
||||
writer.Write (output, 0, output.Length);
|
||||
}
|
||||
|
||||
public void WriteUInt16 (int value)
|
||||
@@ -79,12 +128,43 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
public void WriteUInt32 (int value)
|
||||
{
|
||||
writer.WriteLine ("\t.long\t\t" + value);
|
||||
char[] output = { '\t', '.', 'l', 'o', 'n', 'g', '\t', '\t',
|
||||
'0', 'x', '\0', '\0', '\0', '\0', '\0', '\0',
|
||||
'\0', '\0', '\n' };
|
||||
|
||||
unchecked {
|
||||
output [10] = hex [(value & 0xf0000000) >> 28];
|
||||
output [11] = hex [(value & 0x0f000000) >> 24];
|
||||
output [12] = hex [(value & 0x00f00000) >> 20];
|
||||
output [13] = hex [(value & 0x000f0000) >> 16];
|
||||
output [14] = hex [(value & 0x0000f000) >> 12];
|
||||
output [15] = hex [(value & 0x00000f00) >> 8];
|
||||
output [16] = hex [(value & 0x000000f0) >> 4];
|
||||
output [17] = hex [(value & 0x0000000f)];
|
||||
}
|
||||
|
||||
writer.Write (output, 0, output.Length);
|
||||
}
|
||||
|
||||
public void WriteInt32 (int value)
|
||||
{
|
||||
writer.WriteLine ("\t.long\t\t" + value);
|
||||
char[] output = { '\t', '.', 'l', 'o', 'n', 'g', '\t', '\t',
|
||||
'0', 'x', '\0', '\0', '\0', '\0', '\0', '\0',
|
||||
'\0', '\0', '\n' };
|
||||
|
||||
unchecked {
|
||||
uint uvalue = (uint) value;
|
||||
output [10] = hex [(uvalue & 0xf0000000) >> 28];
|
||||
output [11] = hex [(uvalue & 0x0f000000) >> 24];
|
||||
output [12] = hex [(uvalue & 0x00f00000) >> 20];
|
||||
output [13] = hex [(uvalue & 0x000f0000) >> 16];
|
||||
output [14] = hex [(uvalue & 0x0000f000) >> 12];
|
||||
output [15] = hex [(uvalue & 0x00000f00) >> 8];
|
||||
output [16] = hex [(uvalue & 0x000000f0) >> 4];
|
||||
output [17] = hex [(uvalue & 0x0000000f)];
|
||||
}
|
||||
|
||||
writer.Write (output, 0, output.Length);
|
||||
}
|
||||
|
||||
public void WriteSLeb128 (int value)
|
||||
@@ -99,7 +179,10 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
public void WriteAddress (int value)
|
||||
{
|
||||
writer.WriteLine ("\t.long\t\t" + value);
|
||||
if (value == 0)
|
||||
writer.WriteLine ("\t.long\t\t0");
|
||||
else
|
||||
writer.WriteLine ("\t.long\t\t" + value);
|
||||
}
|
||||
|
||||
public void WriteString (string value)
|
||||
@@ -117,14 +200,56 @@ namespace Mono.CSharp.Debugger
|
||||
writer.WriteLine ("\t.previous\n");
|
||||
}
|
||||
|
||||
public void WriteRelativeOffset (string start_label, string end_label)
|
||||
public void WriteRelativeOffset (int start_label, int end_label)
|
||||
{
|
||||
writer.WriteLine ("\t.long\t\t.L_" + end_label + " - .L_" + start_label);
|
||||
char[] output = { '\t', '.', 'l', 'o', 'n', 'g', '\t', '\t',
|
||||
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
|
||||
' ', '-', ' ',
|
||||
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
|
||||
'\n' };
|
||||
|
||||
unchecked {
|
||||
output [11] = hex [(end_label & 0xf00000) >> 20];
|
||||
output [12] = hex [(end_label & 0x0f0000) >> 16];
|
||||
output [13] = hex [(end_label & 0x00f000) >> 12];
|
||||
output [14] = hex [(end_label & 0x000f00) >> 8];
|
||||
output [15] = hex [(end_label & 0x0000f0) >> 4];
|
||||
output [16] = hex [(end_label & 0x00000f)];
|
||||
output [23] = hex [(start_label & 0xf00000) >> 20];
|
||||
output [24] = hex [(start_label & 0x0f0000) >> 16];
|
||||
output [25] = hex [(start_label & 0x00f000) >> 12];
|
||||
output [26] = hex [(start_label & 0x000f00) >> 8];
|
||||
output [27] = hex [(start_label & 0x0000f0) >> 4];
|
||||
output [28] = hex [(start_label & 0x00000f)];
|
||||
}
|
||||
|
||||
writer.Write (output, 0, output.Length);
|
||||
}
|
||||
|
||||
public void WriteShortRelativeOffset (string start_label, string end_label)
|
||||
public void WriteShortRelativeOffset (int start_label, int end_label)
|
||||
{
|
||||
writer.WriteLine ("\t.byte\t\t.L_" + end_label + " - .L_" + start_label);
|
||||
char[] output = { '\t', '.', 'b', 'y', 't', 'e', '\t', '\t',
|
||||
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
|
||||
' ', '-', ' ',
|
||||
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
|
||||
'\n' };
|
||||
|
||||
unchecked {
|
||||
output [11] = hex [(end_label & 0xf00000) >> 20];
|
||||
output [12] = hex [(end_label & 0x0f0000) >> 16];
|
||||
output [13] = hex [(end_label & 0x00f000) >> 12];
|
||||
output [14] = hex [(end_label & 0x000f00) >> 8];
|
||||
output [15] = hex [(end_label & 0x0000f0) >> 4];
|
||||
output [16] = hex [(end_label & 0x00000f)];
|
||||
output [23] = hex [(start_label & 0xf00000) >> 20];
|
||||
output [24] = hex [(start_label & 0x0f0000) >> 16];
|
||||
output [25] = hex [(start_label & 0x00f000) >> 12];
|
||||
output [26] = hex [(start_label & 0x000f00) >> 8];
|
||||
output [27] = hex [(start_label & 0x0000f0) >> 4];
|
||||
output [28] = hex [(start_label & 0x00000f)];
|
||||
}
|
||||
|
||||
writer.Write (output, 0, output.Length);
|
||||
}
|
||||
|
||||
public void WriteAbsoluteOffset (string label)
|
||||
@@ -132,12 +257,31 @@ namespace Mono.CSharp.Debugger
|
||||
writer.WriteLine ("\t.long\t\t.L_" + label);
|
||||
}
|
||||
|
||||
public void WriteAbsoluteOffset (int index)
|
||||
{
|
||||
char[] output = { '\t', '.', 'l', 'o', 'n', 'g', '\t', '\t',
|
||||
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
|
||||
'\n' };
|
||||
|
||||
unchecked {
|
||||
output [11] = hex [(index & 0xf00000) >> 20];
|
||||
output [12] = hex [(index & 0x0f0000) >> 16];
|
||||
output [13] = hex [(index & 0x00f000) >> 12];
|
||||
output [14] = hex [(index & 0x000f00) >> 8];
|
||||
output [15] = hex [(index & 0x0000f0) >> 4];
|
||||
output [16] = hex [(index & 0x00000f)];
|
||||
}
|
||||
|
||||
writer.Write (output, 0, output.Length);
|
||||
|
||||
}
|
||||
|
||||
public object StartSubsectionWithSize ()
|
||||
{
|
||||
int start_index = GetNextLabelIndex ();
|
||||
int end_index = GetNextLabelIndex ();
|
||||
int start_index = ++next_anon_label_idx;
|
||||
int end_index = ++next_anon_label_idx;
|
||||
|
||||
WriteRelativeOffset (GetLabelName (start_index), GetLabelName (end_index));
|
||||
WriteRelativeOffset (start_index, end_index);
|
||||
WriteLabel (start_index);
|
||||
|
||||
return end_index;
|
||||
@@ -145,10 +289,10 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
public object StartSubsectionWithShortSize ()
|
||||
{
|
||||
int start_index = GetNextLabelIndex ();
|
||||
int end_index = GetNextLabelIndex ();
|
||||
int start_index = ++next_anon_label_idx;
|
||||
int end_index = ++next_anon_label_idx;
|
||||
|
||||
WriteShortRelativeOffset (GetLabelName (start_index), GetLabelName (end_index));
|
||||
WriteShortRelativeOffset (start_index, end_index);
|
||||
WriteLabel (start_index);
|
||||
|
||||
return end_index;
|
||||
@@ -160,4 +304,3 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
2002-04-13 Martin Baulig <[email protected]>
|
||||
|
||||
* IMonoSymbolWriter.cs (ISourceBlock): Added `Blocks' property and `AddBlock'
|
||||
method to support nested blocks.
|
||||
|
||||
* MonoSymbolWriter.cs: Correctly handle nested blocks.
|
||||
|
||||
* MonoDwarfFileWriter.cs (DieMember): Provide info for all fields, not just for
|
||||
public ones; also added DW_AT_accessibility.
|
||||
(DieVariable): Reflected latest debug-symfile.c changes.
|
||||
|
||||
2002-04-12 Martin Baulig <[email protected]>
|
||||
|
||||
* gdb-variable-scopes.patch: A patch for GDB (against the latest CVS version)
|
||||
to implement variable lifetimes.
|
||||
|
||||
2002-04-12 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoDwarfFileWriter.cs (DieVariable): Provide info about the variable's
|
||||
lifetime using DW_AT_begin_scope and a new baulig extension DW_AT_end_scope.
|
||||
|
||||
2002-03-29 Martin Baulig <[email protected]>
|
||||
|
||||
* AssemblerWriterI386.cs: Rewrote most of the string output function, do the
|
||||
number->string conversion manually. It's now taking about 15 seconds to write
|
||||
a symbol file for MCS, no longer more than a minute.
|
||||
|
||||
* MonoDwarfFileWriter.cs: Added some profiling code, speeded things up, fixed
|
||||
a few bugs.
|
||||
|
||||
2002-03-25 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoDwarfFileWriter.cs (CreateType): Return a `DieType'.
|
||||
|
||||
@@ -19,8 +19,6 @@ namespace Mono.CSharp.Debugger
|
||||
{
|
||||
int GetNextLabelIndex ();
|
||||
|
||||
string GetLabelName (int index);
|
||||
|
||||
void WriteLabel (int index);
|
||||
|
||||
void WriteLabel (string label);
|
||||
@@ -33,6 +31,8 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
void WriteInt8 (int value);
|
||||
|
||||
void Write2Bytes (int a, int b);
|
||||
|
||||
void WriteUInt16 (int value);
|
||||
|
||||
void WriteInt16 (int value);
|
||||
@@ -53,9 +53,11 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
void WriteSectionEnd ();
|
||||
|
||||
void WriteRelativeOffset (string start_label, string end_label);
|
||||
void WriteRelativeOffset (int start_label, int end_label);
|
||||
|
||||
void WriteShortRelativeOffset (string start_label, string end_label);
|
||||
void WriteShortRelativeOffset (int start_label, int end_label);
|
||||
|
||||
void WriteAbsoluteOffset (int index);
|
||||
|
||||
void WriteAbsoluteOffset (string label);
|
||||
|
||||
|
||||
@@ -86,6 +86,12 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
void AddLocal (ILocalVariable local);
|
||||
|
||||
ISourceBlock[] Blocks {
|
||||
get;
|
||||
}
|
||||
|
||||
void AddBlock (ISourceBlock block);
|
||||
|
||||
ISourceLine Start {
|
||||
get;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ using System.Reflection.Emit;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Diagnostics.SymbolStore;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
@@ -30,6 +31,9 @@ namespace Mono.CSharp.Debugger
|
||||
protected IAssemblerWriter aw = null;
|
||||
protected string symbol_file = null;
|
||||
|
||||
public bool timestamps = true;
|
||||
public bool use_gnu_extensions = false;
|
||||
|
||||
// Write a generic file which contains no machine dependant stuff but
|
||||
// only function and type declarations.
|
||||
protected readonly bool DoGeneric = false;
|
||||
@@ -40,21 +44,48 @@ namespace Mono.CSharp.Debugger
|
||||
public DwarfFileWriter (string symbol_file)
|
||||
{
|
||||
this.symbol_file = symbol_file;
|
||||
this.writer = new StreamWriter (symbol_file);
|
||||
this.writer = new StreamWriter (symbol_file, false, Encoding.ASCII);
|
||||
this.aw = new AssemblerWriterI386 (this.writer);
|
||||
this.last_time = DateTime.Now;
|
||||
}
|
||||
|
||||
DateTime last_time;
|
||||
void ShowTime (string msg)
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
TimeSpan span = now - last_time;
|
||||
last_time = now;
|
||||
|
||||
Console.WriteLine (
|
||||
"MonoDwarfFileWriter [{0:00}:{1:000}] {2}",
|
||||
(int) span.TotalSeconds, span.Milliseconds, msg);
|
||||
}
|
||||
|
||||
// Writes the final dwarf file.
|
||||
public void Close ()
|
||||
{
|
||||
if (timestamps)
|
||||
ShowTime ("Emitting compile units");
|
||||
|
||||
foreach (CompileUnit compile_unit in compile_units)
|
||||
compile_unit.Emit ();
|
||||
|
||||
if (timestamps)
|
||||
ShowTime ("Done");
|
||||
|
||||
foreach (LineNumberEngine line_number_engine in line_number_engines)
|
||||
line_number_engine.Emit ();
|
||||
|
||||
if (timestamps)
|
||||
ShowTime ("Done emitting " + LineNumberEngine.count + " line numbers");
|
||||
|
||||
WriteAbbrevDeclarations ();
|
||||
if (timestamps)
|
||||
ShowTime ("Done writing abbrev declarations");
|
||||
|
||||
WriteRelocEntries ();
|
||||
if (timestamps)
|
||||
ShowTime ("Done writing " + reloc_entries.Count + " reloc entries");
|
||||
|
||||
writer.Close ();
|
||||
}
|
||||
@@ -104,7 +135,9 @@ namespace Mono.CSharp.Debugger
|
||||
else if (type.IsClass)
|
||||
return new DieClassType (die_compile_unit, type);
|
||||
|
||||
throw new NotSupportedException ("Type " + type + " is not yet supported.");
|
||||
return new DiePointerType (die_compile_unit, typeof (void));
|
||||
|
||||
// throw new NotSupportedException ("Type " + type + " is not yet supported.");
|
||||
}
|
||||
|
||||
//
|
||||
@@ -117,10 +150,7 @@ namespace Mono.CSharp.Debugger
|
||||
protected string source_file;
|
||||
protected ArrayList dies = new ArrayList ();
|
||||
|
||||
private static int next_ref_index = 0;
|
||||
|
||||
public readonly int ReferenceIndex;
|
||||
public readonly string ReferenceLabel;
|
||||
|
||||
public CompileUnit (DwarfFileWriter dw, string source_file, Die[] dies)
|
||||
{
|
||||
@@ -130,8 +160,7 @@ namespace Mono.CSharp.Debugger
|
||||
if (dies != null)
|
||||
this.dies.AddRange (dies);
|
||||
|
||||
this.ReferenceIndex = ++next_ref_index;
|
||||
this.ReferenceLabel = "COMPILE_UNIT_" + this.ReferenceIndex;
|
||||
this.ReferenceIndex = this.aw.GetNextLabelIndex ();
|
||||
|
||||
dw.AddCompileUnit (this);
|
||||
}
|
||||
@@ -178,7 +207,7 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
dw.WriteSectionStart (Section.DEBUG_INFO);
|
||||
|
||||
aw.WriteLabel (ReferenceLabel);
|
||||
aw.WriteLabel (ReferenceIndex);
|
||||
|
||||
start_index = aw.WriteLabel ();
|
||||
|
||||
@@ -205,7 +234,6 @@ namespace Mono.CSharp.Debugger
|
||||
public class LineNumberEngine
|
||||
{
|
||||
public readonly int ReferenceIndex;
|
||||
public readonly string ReferenceLabel;
|
||||
|
||||
public readonly int LineBase = 1;
|
||||
public readonly int LineRange = 8;
|
||||
@@ -219,6 +247,8 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
public readonly int OpcodeBase;
|
||||
|
||||
public static int count = 0;
|
||||
|
||||
private Hashtable _sources = new Hashtable ();
|
||||
private Hashtable _directories = new Hashtable ();
|
||||
private Hashtable _methods = new Hashtable ();
|
||||
@@ -226,7 +256,6 @@ namespace Mono.CSharp.Debugger
|
||||
private int next_source_id;
|
||||
private int next_directory_id;
|
||||
|
||||
private static int next_ref_index;
|
||||
private int next_method_id;
|
||||
|
||||
private enum DW_LNS {
|
||||
@@ -248,7 +277,6 @@ namespace Mono.CSharp.Debugger
|
||||
LNE_define_file = 3
|
||||
};
|
||||
|
||||
|
||||
public ISourceFile[] Sources {
|
||||
get {
|
||||
ISourceFile[] retval = new ISourceFile [_sources.Count];
|
||||
@@ -287,8 +315,7 @@ namespace Mono.CSharp.Debugger
|
||||
{
|
||||
this.dw = writer;
|
||||
this.aw = writer.AssemblerWriter;
|
||||
this.ReferenceIndex = ++next_ref_index;
|
||||
this.ReferenceLabel = "DEBUG_LINE_" + this.ReferenceIndex;
|
||||
this.ReferenceIndex = aw.GetNextLabelIndex ();
|
||||
|
||||
dw.AddLineNumberEngine (this);
|
||||
}
|
||||
@@ -328,7 +355,6 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
|
||||
private int st_line = 1;
|
||||
private int st_address = 0;
|
||||
|
||||
private void SetLine (int line)
|
||||
{
|
||||
@@ -345,7 +371,6 @@ namespace Mono.CSharp.Debugger
|
||||
dw.AddRelocEntry (RelocEntryType.IL_OFFSET, token, address);
|
||||
aw.WriteAddress (0);
|
||||
aw.EndSubsection (end_index);
|
||||
st_address = address;
|
||||
}
|
||||
|
||||
private void SetStartAddress (int token)
|
||||
@@ -380,7 +405,6 @@ namespace Mono.CSharp.Debugger
|
||||
aw.WriteUInt8 ((int) DW_LNE.LNE_end_sequence);
|
||||
|
||||
st_line = 1;
|
||||
st_address = 0;
|
||||
}
|
||||
|
||||
private void Commit ()
|
||||
@@ -388,10 +412,27 @@ namespace Mono.CSharp.Debugger
|
||||
aw.WriteUInt8 ((int) DW_LNS.LNS_copy);
|
||||
}
|
||||
|
||||
private void WriteOneLine (int token, int line, int offset)
|
||||
{
|
||||
aw.WriteInt8 ((int) DW_LNS.LNS_advance_line);
|
||||
aw.WriteSLeb128 (line - st_line);
|
||||
aw.WriteUInt8 (0);
|
||||
object end_index = aw.StartSubsectionWithShortSize ();
|
||||
aw.WriteUInt8 ((int) DW_LNE.LNE_set_address);
|
||||
dw.AddRelocEntry (RelocEntryType.IL_OFFSET, token, offset);
|
||||
aw.WriteAddress (0);
|
||||
aw.EndSubsection (end_index);
|
||||
|
||||
aw.Write2Bytes ((int) DW_LNS.LNS_set_basic_block,
|
||||
(int) DW_LNS.LNS_copy);
|
||||
|
||||
st_line = line;
|
||||
}
|
||||
|
||||
public void Emit ()
|
||||
{
|
||||
dw.WriteSectionStart (Section.DEBUG_LINE);
|
||||
aw.WriteLabel (ReferenceLabel);
|
||||
aw.WriteLabel (ReferenceIndex);
|
||||
object end_index = aw.StartSubsectionWithSize ();
|
||||
|
||||
aw.WriteUInt16 (2);
|
||||
@@ -430,10 +471,12 @@ namespace Mono.CSharp.Debugger
|
||||
Commit ();
|
||||
|
||||
foreach (ISourceLine line in method.Lines) {
|
||||
SetLine (line.Row);
|
||||
SetAddress (method.Token, line.Offset);
|
||||
SetBasicBlock ();
|
||||
Commit ();
|
||||
count++;
|
||||
WriteOneLine (method.Token, line.Row, line.Offset);
|
||||
// SetLine (line.Row);
|
||||
// SetAddress (method.Token, line.Offset);
|
||||
// SetBasicBlock ();
|
||||
// Commit ();
|
||||
}
|
||||
|
||||
SetLine (method.End.Row);
|
||||
@@ -479,16 +522,21 @@ namespace Mono.CSharp.Debugger
|
||||
AT_low_pc = 0x11,
|
||||
AT_high_pc = 0x12,
|
||||
AT_language = 0x13,
|
||||
AT_string_length = 0x19,
|
||||
AT_const_value = 0x1c,
|
||||
AT_lower_bound = 0x22,
|
||||
AT_producer = 0x25,
|
||||
AT_start_scope = 0x2c,
|
||||
AT_upper_bound = 0x2f,
|
||||
AT_accessibility = 0x32,
|
||||
AT_artificial = 0x34,
|
||||
AT_data_member_location = 0x38,
|
||||
AT_declaration = 0x3c,
|
||||
AT_encoding = 0x3e,
|
||||
AT_external = 0x3f,
|
||||
AT_type = 0x49
|
||||
AT_type = 0x49,
|
||||
AT_data_location = 0x50,
|
||||
AT_end_scope = 0x2121
|
||||
}
|
||||
|
||||
// DWARF form from the DWARF 2 specification.
|
||||
@@ -499,13 +547,14 @@ namespace Mono.CSharp.Debugger
|
||||
FORM_string = 0x08,
|
||||
FORM_data1 = 0x0b,
|
||||
FORM_flag = 0x0c,
|
||||
FORM_sdata = 0x0d,
|
||||
FORM_udata = 0x0f,
|
||||
FORM_ref4 = 0x13
|
||||
|
||||
}
|
||||
|
||||
public enum DW_LANG {
|
||||
LANG_C_plus_plus = 0x04,
|
||||
LANG_C_sharp = LANG_C_plus_plus
|
||||
LANG_C_sharp = 0x9001
|
||||
}
|
||||
|
||||
public enum DW_OP {
|
||||
@@ -525,6 +574,12 @@ namespace Mono.CSharp.Debugger
|
||||
OP_fbreg = 0x91,
|
||||
}
|
||||
|
||||
public enum DW_ACCESS {
|
||||
ACCESS_public = 1,
|
||||
ACCESS_protected = 2,
|
||||
ACCESS_private = 3
|
||||
};
|
||||
|
||||
protected enum MRI_string {
|
||||
offset_length = 0x00,
|
||||
offset_vector = 0x01
|
||||
@@ -600,13 +655,10 @@ namespace Mono.CSharp.Debugger
|
||||
protected ArrayList child_dies = new ArrayList ();
|
||||
public readonly Die Parent;
|
||||
|
||||
private static int next_ref_index = 0;
|
||||
|
||||
protected readonly int abbrev_id;
|
||||
protected readonly AbbrevDeclaration abbrev_decl;
|
||||
|
||||
public readonly int ReferenceIndex;
|
||||
public readonly string ReferenceLabel;
|
||||
|
||||
//
|
||||
// Create a new die If @parent is not null, add the newly
|
||||
@@ -625,8 +677,7 @@ namespace Mono.CSharp.Debugger
|
||||
this.Parent = parent;
|
||||
this.abbrev_id = abbrev_id;
|
||||
this.abbrev_decl = GetAbbrevDeclaration (abbrev_id);
|
||||
this.ReferenceIndex = ++next_ref_index;
|
||||
this.ReferenceLabel = "DIE_" + this.ReferenceIndex;
|
||||
this.ReferenceIndex = this.aw.GetNextLabelIndex ();
|
||||
|
||||
if (parent != null)
|
||||
parent.AddChildDie (this);
|
||||
@@ -663,7 +714,7 @@ namespace Mono.CSharp.Debugger
|
||||
//
|
||||
public virtual void Emit ()
|
||||
{
|
||||
aw.WriteLabel (ReferenceLabel);
|
||||
aw.WriteLabel (ReferenceIndex);
|
||||
|
||||
aw.WriteULeb128 (abbrev_id);
|
||||
DoEmit ();
|
||||
@@ -721,7 +772,7 @@ namespace Mono.CSharp.Debugger
|
||||
AbbrevEntry[] entries = {
|
||||
new AbbrevEntry (DW_AT.AT_name, DW_FORM.FORM_string),
|
||||
new AbbrevEntry (DW_AT.AT_producer, DW_FORM.FORM_string),
|
||||
new AbbrevEntry (DW_AT.AT_language, DW_FORM.FORM_data1),
|
||||
new AbbrevEntry (DW_AT.AT_language, DW_FORM.FORM_udata),
|
||||
new AbbrevEntry (DW_AT.AT_stmt_list, DW_FORM.FORM_ref4)
|
||||
};
|
||||
AbbrevDeclaration decl = new AbbrevDeclaration (
|
||||
@@ -806,16 +857,19 @@ namespace Mono.CSharp.Debugger
|
||||
throw new ArgumentException ("Target die must be in the same "
|
||||
+ "compile unit");
|
||||
|
||||
aw.WriteRelativeOffset (CompileUnit.ReferenceLabel,
|
||||
target_die.ReferenceLabel);
|
||||
aw.WriteRelativeOffset (CompileUnit.ReferenceIndex,
|
||||
target_die.ReferenceIndex);
|
||||
}
|
||||
|
||||
public override void DoEmit ()
|
||||
{
|
||||
aw.WriteString (CompileUnit.SourceFile);
|
||||
aw.WriteString (CompileUnit.ProducerID);
|
||||
aw.WriteUInt8 ((int) DW_LANG.LANG_C_sharp);
|
||||
aw.WriteAbsoluteOffset (LineNumberEngine.ReferenceLabel);
|
||||
if (dw.use_gnu_extensions)
|
||||
aw.WriteULeb128 ((int) DW_LANG.LANG_C_sharp);
|
||||
else
|
||||
aw.WriteULeb128 ((int) DW_LANG.LANG_C_plus_plus);
|
||||
aw.WriteAbsoluteOffset (LineNumberEngine.ReferenceIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1182,8 +1236,29 @@ namespace Mono.CSharp.Debugger
|
||||
public DieEnumType (DieCompileUnit parent_die, Type type)
|
||||
: base (parent_die, type, my_abbrev_id)
|
||||
{
|
||||
foreach (object value in Enum.GetValues (type))
|
||||
new DieEnumerator (this, Enum.GetName (type, value), (int) value);
|
||||
Array values = Enum.GetValues (type);
|
||||
string[] names = Enum.GetNames (type);
|
||||
|
||||
foreach (object value in values) {
|
||||
int intval;
|
||||
string name = null;
|
||||
|
||||
if (value is int)
|
||||
intval = (int) value;
|
||||
else
|
||||
intval = System.Convert.ToInt32 (value);
|
||||
|
||||
for (int i = 0; i < values.Length; ++i)
|
||||
if (value.Equals (values.GetValue (i))) {
|
||||
name = names [i];
|
||||
break;
|
||||
}
|
||||
|
||||
if (name == null)
|
||||
throw new ArgumentException ();
|
||||
|
||||
new DieEnumerator (this, name, intval);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoEmit ()
|
||||
@@ -1225,7 +1300,7 @@ namespace Mono.CSharp.Debugger
|
||||
public override void DoEmit ()
|
||||
{
|
||||
aw.WriteString (name);
|
||||
aw.WriteUInt32 (value);
|
||||
aw.WriteInt32 (value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1252,17 +1327,31 @@ namespace Mono.CSharp.Debugger
|
||||
protected Die[] field_type_dies;
|
||||
protected Die[] field_dies;
|
||||
|
||||
protected const BindingFlags FieldBindingFlags =
|
||||
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static |
|
||||
BindingFlags.Instance;
|
||||
|
||||
public override void RegisterDependencyTypes ()
|
||||
{
|
||||
fields = type.GetFields ();
|
||||
fields = type.GetFields (FieldBindingFlags);
|
||||
field_type_dies = new Die [fields.Length];
|
||||
field_dies = new Die [fields.Length];
|
||||
|
||||
for (int i = 0; i < fields.Length; i++) {
|
||||
Type field_type = fields [i].FieldType;
|
||||
field_type_dies [i] = DieCompileUnit.RegisterType (field_type);
|
||||
|
||||
DW_ACCESS access;
|
||||
if (fields [i].IsPublic)
|
||||
access = DW_ACCESS.ACCESS_public;
|
||||
else if (fields [i].IsPrivate)
|
||||
access = DW_ACCESS.ACCESS_private;
|
||||
else
|
||||
access = DW_ACCESS.ACCESS_protected;
|
||||
|
||||
field_dies [i] = new DieMember (this, type, fields [i].Name,
|
||||
i, field_type_dies [i]);
|
||||
i, field_type_dies [i],
|
||||
access);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1338,20 +1427,26 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
public class DieStringType : DieStructureType
|
||||
{
|
||||
|
||||
public override void RegisterDependencyTypes ()
|
||||
{
|
||||
Die length_die = DieCompileUnit.RegisterType (typeof (int));
|
||||
new DieMember (this, typeof (MonoString), "Length",
|
||||
(int) MRI_string.offset_length, length_die);
|
||||
|
||||
Die vector_die = new DieArrayType (DieCompileUnit, typeof (char), 1);
|
||||
new DieSubRangeType (vector_die, typeof (int), 0, -1);
|
||||
if (dw.use_gnu_extensions) {
|
||||
Die string_die = new DieInternalString (DieCompileUnit);
|
||||
|
||||
Die vector_ptr_die = new DieInternalPointer (DieCompileUnit, vector_die);
|
||||
new DieMember (this, typeof (MonoString), "String",
|
||||
(int) MRI_string.offset_vector, string_die);
|
||||
} else {
|
||||
Die vector_die = new DieArrayType (DieCompileUnit, typeof (char), 1);
|
||||
new DieSubRangeType (vector_die, typeof (int), 0, -1);
|
||||
|
||||
new DieMember (this, typeof (MonoString), "Vector",
|
||||
(int) MRI_string.offset_vector, vector_ptr_die);
|
||||
Die ptr_die = new DieInternalPointer (DieCompileUnit, vector_die);
|
||||
|
||||
new DieMember (this, typeof (MonoString), "Vector",
|
||||
(int) MRI_string.offset_vector, ptr_die);
|
||||
}
|
||||
}
|
||||
|
||||
public DieStringType (DieCompileUnit parent_die, Type type)
|
||||
@@ -1359,6 +1454,41 @@ namespace Mono.CSharp.Debugger
|
||||
{ }
|
||||
}
|
||||
|
||||
public class DieInternalString : Die
|
||||
{
|
||||
private static int my_abbrev_id;
|
||||
|
||||
static DieInternalString ()
|
||||
{
|
||||
AbbrevEntry[] entries = {
|
||||
new AbbrevEntry (DW_AT.AT_string_length, DW_FORM.FORM_data4),
|
||||
new AbbrevEntry (DW_AT.AT_byte_size, DW_FORM.FORM_data4),
|
||||
new AbbrevEntry (DW_AT.AT_data_location, DW_FORM.FORM_data4)
|
||||
};
|
||||
|
||||
AbbrevDeclaration decl = new AbbrevDeclaration (
|
||||
DW_TAG.TAG_string_type, false, entries);
|
||||
|
||||
my_abbrev_id = RegisterAbbrevDeclaration (decl);
|
||||
}
|
||||
|
||||
public DieInternalString (Die parent_die)
|
||||
: base (parent_die, my_abbrev_id)
|
||||
{ }
|
||||
|
||||
public override void DoEmit ()
|
||||
{
|
||||
dw.AddRelocEntry_TypeFieldOffset (typeof (MonoArray),
|
||||
(int) MRI_array.offset_max_length);
|
||||
aw.WriteInt32 (0);
|
||||
dw.AddRelocEntry_TypeFieldSize (typeof (MonoArray),
|
||||
(int) MRI_array.offset_max_length);
|
||||
aw.WriteInt32 (0);
|
||||
dw.AddRelocEntry_TypeFieldOffset (typeof (MonoArray),
|
||||
(int) MRI_array.offset_vector);
|
||||
aw.WriteInt32 (0);
|
||||
}
|
||||
}
|
||||
|
||||
protected class DieInternalArray : Die
|
||||
{
|
||||
@@ -1431,8 +1561,8 @@ namespace Mono.CSharp.Debugger
|
||||
public override void DoEmit ()
|
||||
{
|
||||
DieCompileUnit.WriteRelativeDieReference (type_die);
|
||||
aw.WriteUInt32 (lower);
|
||||
aw.WriteUInt32 (upper);
|
||||
aw.WriteInt32 (lower);
|
||||
aw.WriteInt32 (upper);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1523,6 +1653,7 @@ namespace Mono.CSharp.Debugger
|
||||
AbbrevEntry[] entries = {
|
||||
new AbbrevEntry (DW_AT.AT_name, DW_FORM.FORM_string),
|
||||
new AbbrevEntry (DW_AT.AT_type, DW_FORM.FORM_ref4),
|
||||
new AbbrevEntry (DW_AT.AT_accessibility, DW_FORM.FORM_data1),
|
||||
new AbbrevEntry (DW_AT.AT_data_member_location, DW_FORM.FORM_block4)
|
||||
};
|
||||
|
||||
@@ -1536,21 +1667,30 @@ namespace Mono.CSharp.Debugger
|
||||
protected string name;
|
||||
protected int index;
|
||||
protected Die type_die;
|
||||
protected DW_ACCESS access;
|
||||
|
||||
public DieMember (Die parent_die, Type parent_type, string name, int index,
|
||||
Die type_die)
|
||||
Die type_die, DW_ACCESS access)
|
||||
: base (parent_die, my_abbrev_id)
|
||||
{
|
||||
this.name = name;
|
||||
this.index = index;
|
||||
this.parent_type = parent_type;
|
||||
this.type_die = type_die;
|
||||
this.access = access;
|
||||
}
|
||||
|
||||
public DieMember (Die parent_die, Type parent_type, string name, int index,
|
||||
Die type_die)
|
||||
: this (parent_die, parent_type, name, index, type_die,
|
||||
DW_ACCESS.ACCESS_public)
|
||||
{ }
|
||||
|
||||
public override void DoEmit ()
|
||||
{
|
||||
aw.WriteString (name);
|
||||
DieCompileUnit.WriteRelativeDieReference (type_die);
|
||||
aw.WriteUInt8 ((int) access);
|
||||
|
||||
object end_index = aw.StartSubsectionWithSize ();
|
||||
aw.WriteUInt8 ((int) DW_OP.OP_const4u);
|
||||
@@ -1592,9 +1732,6 @@ namespace Mono.CSharp.Debugger
|
||||
int start_offset = block.Start.Offset;
|
||||
int end_offset = block.End.Offset;
|
||||
|
||||
Console.WriteLine ("BLOCK: " + token + " " + start_offset + " " +
|
||||
end_offset);
|
||||
|
||||
dw.AddRelocEntry (RelocEntryType.IL_OFFSET, token, start_offset);
|
||||
aw.WriteAddress (0);
|
||||
dw.AddRelocEntry (RelocEntryType.IL_OFFSET, token, end_offset);
|
||||
@@ -1635,8 +1772,16 @@ namespace Mono.CSharp.Debugger
|
||||
new AbbrevEntry (DW_AT.AT_type, DW_FORM.FORM_ref4),
|
||||
new AbbrevEntry (DW_AT.AT_external, DW_FORM.FORM_flag),
|
||||
new AbbrevEntry (DW_AT.AT_location, DW_FORM.FORM_block4),
|
||||
new AbbrevEntry (DW_AT.AT_start_scope, DW_FORM.FORM_addr),
|
||||
new AbbrevEntry (DW_AT.AT_end_scope, DW_FORM.FORM_addr)
|
||||
};
|
||||
AbbrevEntry[] entries_2 = {
|
||||
new AbbrevEntry (DW_AT.AT_name, DW_FORM.FORM_string),
|
||||
new AbbrevEntry (DW_AT.AT_type, DW_FORM.FORM_ref4),
|
||||
new AbbrevEntry (DW_AT.AT_external, DW_FORM.FORM_flag),
|
||||
new AbbrevEntry (DW_AT.AT_location, DW_FORM.FORM_block4),
|
||||
};
|
||||
AbbrevEntry[] entries_3 = {
|
||||
new AbbrevEntry (DW_AT.AT_name, DW_FORM.FORM_string),
|
||||
new AbbrevEntry (DW_AT.AT_type, DW_FORM.FORM_ref4),
|
||||
new AbbrevEntry (DW_AT.AT_artificial, DW_FORM.FORM_flag),
|
||||
@@ -1646,9 +1791,9 @@ namespace Mono.CSharp.Debugger
|
||||
AbbrevDeclaration decl_local = new AbbrevDeclaration (
|
||||
DW_TAG.TAG_variable, false, entries_1);
|
||||
AbbrevDeclaration decl_param = new AbbrevDeclaration (
|
||||
DW_TAG.TAG_formal_parameter, false, entries_1);
|
||||
AbbrevDeclaration decl_this = new AbbrevDeclaration (
|
||||
DW_TAG.TAG_formal_parameter, false, entries_2);
|
||||
AbbrevDeclaration decl_this = new AbbrevDeclaration (
|
||||
DW_TAG.TAG_formal_parameter, false, entries_3);
|
||||
|
||||
|
||||
my_abbrev_id_local = RegisterAbbrevDeclaration (decl_local);
|
||||
@@ -1677,6 +1822,10 @@ namespace Mono.CSharp.Debugger
|
||||
DieCompileUnit.WriteRelativeDieReference (type_die);
|
||||
switch (vtype) {
|
||||
case VariableType.VARIABLE_LOCAL:
|
||||
aw.WriteUInt8 (false);
|
||||
DoEmitLocation ();
|
||||
DoEmitScope ();
|
||||
break;
|
||||
case VariableType.VARIABLE_PARAMETER:
|
||||
aw.WriteUInt8 (false);
|
||||
DoEmitLocation ();
|
||||
@@ -1689,6 +1838,7 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
|
||||
protected abstract void DoEmitLocation ();
|
||||
protected abstract void DoEmitScope ();
|
||||
}
|
||||
|
||||
public class DieMethodVariable : DieVariable
|
||||
@@ -1718,11 +1868,8 @@ namespace Mono.CSharp.Debugger
|
||||
protected override void DoEmitLocation ()
|
||||
{
|
||||
object end_index = aw.StartSubsectionWithSize ();
|
||||
// This looks a bit strange, but OP_fbreg takes a sleb128
|
||||
// agument and we can't fields of variable size.
|
||||
aw.WriteUInt8 ((int) DW_OP.OP_fbreg);
|
||||
aw.WriteSLeb128 (0);
|
||||
aw.WriteUInt8 ((int) DW_OP.OP_const4s);
|
||||
// These relocation entries expect a location description
|
||||
// of exactly 8 bytes.
|
||||
switch (vtype) {
|
||||
case VariableType.VARIABLE_LOCAL:
|
||||
dw.AddRelocEntry (RelocEntryType.LOCAL_VARIABLE,
|
||||
@@ -1737,13 +1884,28 @@ namespace Mono.CSharp.Debugger
|
||||
method.Token, 0);
|
||||
break;
|
||||
}
|
||||
// This looks a bit strange, but OP_fbreg takes a sleb128
|
||||
// agument and we can't fields of variable size.
|
||||
aw.WriteUInt8 ((int) DW_OP.OP_fbreg);
|
||||
aw.WriteSLeb128 (0);
|
||||
aw.WriteUInt8 ((int) DW_OP.OP_const4s);
|
||||
aw.WriteInt32 (0);
|
||||
aw.WriteUInt8 ((int) DW_OP.OP_plus);
|
||||
aw.EndSubsection (end_index);
|
||||
}
|
||||
|
||||
protected override void DoEmitScope ()
|
||||
{
|
||||
dw.AddRelocEntry (RelocEntryType.VARIABLE_START_SCOPE,
|
||||
var.Token, var.Index);
|
||||
aw.WriteAddress (0);
|
||||
dw.AddRelocEntry (RelocEntryType.VARIABLE_END_SCOPE,
|
||||
var.Token, var.Index);
|
||||
aw.WriteAddress (0);
|
||||
}
|
||||
}
|
||||
|
||||
protected const int reloc_table_version = 7;
|
||||
protected const int reloc_table_version = 9;
|
||||
|
||||
protected enum Section {
|
||||
DEBUG_INFO = 0x01,
|
||||
@@ -1829,7 +1991,12 @@ namespace Mono.CSharp.Debugger
|
||||
MONO_ARRAY_SIZEOF = 0x0b,
|
||||
MONO_ARRAY_OFFSET = 0x0c,
|
||||
MONO_ARRAY_BOUNDS_SIZEOF = 0x0d,
|
||||
MONO_ARRAY_BOUNDS_OFFSET = 0x0e
|
||||
MONO_ARRAY_BOUNDS_OFFSET = 0x0e,
|
||||
VARIABLE_START_SCOPE = 0x0f,
|
||||
VARIABLE_END_SCOPE = 0x10,
|
||||
MONO_STRING_FIELDSIZE = 0x11,
|
||||
MONO_ARRAY_FIELDSIZE = 0x12,
|
||||
TYPE_FIELD_FIELDSIZE = 0x13
|
||||
}
|
||||
|
||||
protected class RelocEntry {
|
||||
@@ -1964,6 +2131,16 @@ namespace Mono.CSharp.Debugger
|
||||
AddRelocEntry (RelocEntryType.TYPE_FIELD_OFFSET, type, index);
|
||||
}
|
||||
|
||||
protected void AddRelocEntry_TypeFieldSize (Type type, int index)
|
||||
{
|
||||
if (type.Equals (typeof (MonoString)))
|
||||
AddRelocEntry (RelocEntryType.MONO_STRING_FIELDSIZE, index);
|
||||
else if (type.Equals (typeof (MonoArray)))
|
||||
AddRelocEntry (RelocEntryType.MONO_ARRAY_FIELDSIZE, index);
|
||||
else
|
||||
AddRelocEntry (RelocEntryType.TYPE_FIELD_FIELDSIZE, type, index);
|
||||
}
|
||||
|
||||
//
|
||||
// Mono relocation table. See the README.relocation-table file in this
|
||||
// directory for a detailed description of the file format.
|
||||
@@ -1975,12 +2152,16 @@ namespace Mono.CSharp.Debugger
|
||||
aw.WriteUInt8 (0);
|
||||
object end_index = aw.StartSubsectionWithSize ();
|
||||
|
||||
int count = 0;
|
||||
|
||||
foreach (RelocEntry entry in reloc_entries) {
|
||||
count++;
|
||||
|
||||
aw.WriteUInt8 ((int) entry.RelocType);
|
||||
object tmp_index = aw.StartSubsectionWithSize ();
|
||||
|
||||
aw.WriteUInt8 ((int) entry.Section);
|
||||
aw.WriteAbsoluteOffset (aw.GetLabelName (entry.Index));
|
||||
aw.WriteAbsoluteOffset (entry.Index);
|
||||
|
||||
switch (entry.RelocType) {
|
||||
case RelocEntryType.METHOD_START_ADDRESS:
|
||||
@@ -1992,6 +2173,9 @@ namespace Mono.CSharp.Debugger
|
||||
case RelocEntryType.LOCAL_VARIABLE:
|
||||
case RelocEntryType.METHOD_PARAMETER:
|
||||
case RelocEntryType.TYPE_FIELD_OFFSET:
|
||||
case RelocEntryType.VARIABLE_START_SCOPE:
|
||||
case RelocEntryType.VARIABLE_END_SCOPE:
|
||||
case RelocEntryType.TYPE_FIELD_FIELDSIZE:
|
||||
aw.WriteUInt32 (entry.Token);
|
||||
aw.WriteUInt32 (entry.Original);
|
||||
break;
|
||||
@@ -2002,6 +2186,8 @@ namespace Mono.CSharp.Debugger
|
||||
case RelocEntryType.MONO_STRING_OFFSET:
|
||||
case RelocEntryType.MONO_ARRAY_OFFSET:
|
||||
case RelocEntryType.MONO_ARRAY_BOUNDS_OFFSET:
|
||||
case RelocEntryType.MONO_STRING_FIELDSIZE:
|
||||
case RelocEntryType.MONO_ARRAY_FIELDSIZE:
|
||||
aw.WriteUInt32 (entry.Token);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
|
||||
private readonly ISourceMethod _method;
|
||||
private ArrayList _blocks = new ArrayList ();
|
||||
internal ISourceLine _start;
|
||||
internal ISourceLine _end;
|
||||
|
||||
@@ -104,6 +105,19 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
|
||||
public ISourceBlock[] Blocks {
|
||||
get {
|
||||
ISourceBlock[] retval = new ISourceBlock [_blocks.Count];
|
||||
_blocks.CopyTo (retval);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddBlock (ISourceBlock block)
|
||||
{
|
||||
_blocks.Add (block);
|
||||
}
|
||||
|
||||
public ISourceLine Start {
|
||||
get {
|
||||
return _start;
|
||||
@@ -158,7 +172,7 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return "SourceLine (" + _offset + "," + _row + ":" + _column + ")";
|
||||
return "SourceLine (" + _offset + "@" + _row + ":" + _column + ")";
|
||||
}
|
||||
|
||||
internal SourceOffsetType _type;
|
||||
@@ -306,7 +320,14 @@ namespace Mono.CSharp.Debugger
|
||||
SourceBlock block = (SourceBlock) _block_stack.Pop ();
|
||||
|
||||
block._end = new SourceLine (endOffset);
|
||||
_blocks.Add (block);
|
||||
|
||||
if (_block_stack.Count > 0) {
|
||||
ISourceBlock parent = (ISourceBlock) _block_stack.Peek ();
|
||||
|
||||
parent.AddBlock (block);
|
||||
} else
|
||||
_blocks.Add (block);
|
||||
|
||||
_block_hash.Add (block.ID, block);
|
||||
}
|
||||
|
||||
@@ -617,6 +638,9 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
foreach (ILocalVariable local in block.Locals)
|
||||
WriteLocal (die, local);
|
||||
|
||||
foreach (ISourceBlock subblock in block.Blocks)
|
||||
WriteBlock (die, subblock);
|
||||
}
|
||||
|
||||
protected void WriteMethod (DwarfFileWriter.DieCompileUnit parent_die, ISourceMethod method)
|
||||
@@ -690,3 +714,4 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
Index: include/elf/ChangeLog
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/include/elf/ChangeLog,v
|
||||
retrieving revision 1.121
|
||||
diff -u -u -p -r1.121 ChangeLog
|
||||
--- include/elf/ChangeLog 13 Feb 2002 18:14:48 -0000 1.121
|
||||
+++ include/elf/ChangeLog 12 Apr 2002 19:50:31 -0000
|
||||
@@ -1,3 +1,7 @@
|
||||
+2002-04-12 Martin Baulig <[email protected]>
|
||||
+
|
||||
+ * dwarf2.h (DW_AT_end_scope): Added as GNU extension.
|
||||
+
|
||||
2002-02-13 Matt Fredette <[email protected]>
|
||||
|
||||
* m68k.h (EF_M68000): Define.
|
||||
Index: include/elf/dwarf2.h
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/include/elf/dwarf2.h,v
|
||||
retrieving revision 1.8
|
||||
diff -u -u -p -r1.8 dwarf2.h
|
||||
--- include/elf/dwarf2.h 28 Jan 2002 23:26:53 -0000 1.8
|
||||
+++ include/elf/dwarf2.h 12 Apr 2002 19:50:32 -0000
|
||||
@@ -328,6 +328,8 @@ enum dwarf_attribute
|
||||
DW_AT_src_coords = 0x2104,
|
||||
DW_AT_body_begin = 0x2105,
|
||||
DW_AT_body_end = 0x2106,
|
||||
+ DW_AT_end_scope = 0x2121,
|
||||
+
|
||||
/* VMS Extensions. */
|
||||
DW_AT_VMS_rtnbeg_pd_address = 0x2201
|
||||
};
|
||||
Index: gdb/ChangeLog
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/ChangeLog,v
|
||||
retrieving revision 1.2421
|
||||
diff -u -u -p -r1.2421 ChangeLog
|
||||
--- gdb/ChangeLog 12 Apr 2002 07:37:17 -0000 1.2421
|
||||
+++ gdb/ChangeLog 12 Apr 2002 19:50:38 -0000
|
||||
@@ -1,3 +1,14 @@
|
||||
+2002-04-12 Martin Baulig <[email protected]>
|
||||
+
|
||||
+ * dwarf2read.c (new_symbol): If DW_AT_start_scope and DW_AT_end_scope
|
||||
+ are specified, set SYMBOL_RANGES().
|
||||
+
|
||||
+ * findvar.c (read_var_value): Check whether the current PC is within
|
||||
+ the SYMBOL_RANGES(), return NULL if not.
|
||||
+
|
||||
+ * stack.c (print_block_frame_locals): Only print vars if the current PC
|
||||
+ is in their SYMBOL_RANGES().
|
||||
+
|
||||
2002-04-12 Kevin Buettner <[email protected]>
|
||||
|
||||
From Jimi X <[email protected]>:
|
||||
Index: gdb/dwarf2read.c
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
|
||||
retrieving revision 1.52
|
||||
diff -u -u -p -r1.52 dwarf2read.c
|
||||
--- gdb/dwarf2read.c 4 Apr 2002 22:26:43 -0000 1.52
|
||||
+++ gdb/dwarf2read.c 12 Apr 2002 19:50:44 -0000
|
||||
@@ -4394,6 +4394,19 @@ new_symbol (struct die_info *die, struct
|
||||
add_symbol_to_list (sym, list_in_scope);
|
||||
break;
|
||||
}
|
||||
+ attr = dwarf_attr (die, DW_AT_start_scope);
|
||||
+ attr2 = dwarf_attr (die, DW_AT_end_scope);
|
||||
+ if (attr && attr2)
|
||||
+ {
|
||||
+ struct range_list *r = (struct range_list *)
|
||||
+ obstack_alloc (&objfile->type_obstack,
|
||||
+ sizeof (struct range_list));
|
||||
+
|
||||
+ r->start = DW_ADDR (attr);
|
||||
+ r->end = DW_ADDR (attr2);
|
||||
+
|
||||
+ SYMBOL_RANGES (sym) = r;
|
||||
+ }
|
||||
attr = dwarf_attr (die, DW_AT_location);
|
||||
if (attr)
|
||||
{
|
||||
Index: gdb/findvar.c
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/findvar.c,v
|
||||
retrieving revision 1.31
|
||||
diff -u -u -p -r1.31 findvar.c
|
||||
--- gdb/findvar.c 9 Apr 2002 03:06:13 -0000 1.31
|
||||
+++ gdb/findvar.c 12 Apr 2002 19:50:45 -0000
|
||||
@@ -417,9 +417,11 @@ struct value *
|
||||
read_var_value (register struct symbol *var, struct frame_info *frame)
|
||||
{
|
||||
register struct value *v;
|
||||
+ register struct range_list *r;
|
||||
struct type *type = SYMBOL_TYPE (var);
|
||||
CORE_ADDR addr;
|
||||
register int len;
|
||||
+ int range_ok = 0;
|
||||
|
||||
v = allocate_value (type);
|
||||
VALUE_LVAL (v) = lval_memory; /* The most likely possibility. */
|
||||
@@ -429,6 +431,23 @@ read_var_value (register struct symbol *
|
||||
|
||||
if (frame == NULL)
|
||||
frame = selected_frame;
|
||||
+
|
||||
+ if (!SYMBOL_RANGES (var))
|
||||
+ range_ok = 1;
|
||||
+ else
|
||||
+ {
|
||||
+ for (r = SYMBOL_RANGES (var); r; r = r->next)
|
||||
+ {
|
||||
+ if (r->start <= frame->pc && r->end > frame->pc)
|
||||
+ {
|
||||
+ range_ok = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!range_ok)
|
||||
+ return NULL;
|
||||
|
||||
switch (SYMBOL_CLASS (var))
|
||||
{
|
||||
Index: gdb/stack.c
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/stack.c,v
|
||||
retrieving revision 1.33
|
||||
diff -u -u -p -r1.33 stack.c
|
||||
--- gdb/stack.c 10 Apr 2002 23:32:33 -0000 1.33
|
||||
+++ gdb/stack.c 12 Apr 2002 19:50:47 -0000
|
||||
@@ -1173,14 +1173,36 @@ print_block_frame_locals (struct block *
|
||||
case LOC_REGISTER:
|
||||
case LOC_STATIC:
|
||||
case LOC_BASEREG:
|
||||
- values_printed = 1;
|
||||
- for (j = 0; j < num_tabs; j++)
|
||||
- fputs_filtered ("\t", stream);
|
||||
- fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
|
||||
- fputs_filtered (" = ", stream);
|
||||
- print_variable_value (sym, fi, stream);
|
||||
- fprintf_filtered (stream, "\n");
|
||||
- break;
|
||||
+ {
|
||||
+ struct range_list *r;
|
||||
+ int range_ok = 0;
|
||||
+
|
||||
+ if (!SYMBOL_RANGES (sym))
|
||||
+ range_ok = 1;
|
||||
+ else
|
||||
+ {
|
||||
+ for (r = SYMBOL_RANGES (sym); r; r = r->next)
|
||||
+ {
|
||||
+ if (r->start <= fi->pc && r->end > fi->pc)
|
||||
+ {
|
||||
+ range_ok = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (range_ok)
|
||||
+ {
|
||||
+ values_printed = 1;
|
||||
+ for (j = 0; j < num_tabs; j++)
|
||||
+ fputs_filtered ("\t", stream);
|
||||
+ fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
|
||||
+ fputs_filtered (" = ", stream);
|
||||
+ print_variable_value (sym, fi, stream);
|
||||
+ fprintf_filtered (stream, "\n");
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
default:
|
||||
/* Ignore symbols which are not locals. */
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlClientPermission.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient {
|
||||
|
||||
public sealed class SqlClientPermission : DBDataPermission {
|
||||
|
||||
[MonoTODO]
|
||||
public SqlClientPermission() {
|
||||
// FIXME: do constructor
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlClientPermission(PermissionState state) {
|
||||
// FIXME: do constructor
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlClientPermission(PermissionState state,
|
||||
bool allowBlankPassword) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IPermission Copy() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override void FromXml(SecurityElement
|
||||
securityElement) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IPermission Intersect(IPermission target) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override bool IsSubsetOf(IPermission target) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override string ToString() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override SecurityElement ToXml() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IPermission Union(IPermission target) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlClientPermission() {
|
||||
// FIXME: destructor to release resources
|
||||
}
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlClientPermissionAttribute.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient {
|
||||
|
||||
[AttributeUsage(AttributeTargets.Assembly |
|
||||
AttributeTargets.Class |
|
||||
AttributeTargets.Struct |
|
||||
AttributeTargets.Constructor |
|
||||
AttributeTargets.Method)]
|
||||
[Serializable]
|
||||
public sealed class SqlClientPermissionAttribute :
|
||||
DBDataPermissionAttribute {
|
||||
|
||||
[MonoTODO]
|
||||
[AttributeUsage(AttributeTargets.Assembly |
|
||||
AttributeTargets.Class |
|
||||
AttributeTargets.Struct |
|
||||
AttributeTargets.Constructor |
|
||||
AttributeTargets.Method)]
|
||||
[Serializable]
|
||||
public SqlClientPermissionAttribute(SecurityAction action) {
|
||||
// FIXME: do constructor
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class
|
||||
| AttributeTargets.Struct | AttributeTargets.Constructor |
|
||||
AttributeTargets.Method)]
|
||||
[Serializable]
|
||||
public override IPermission CreatePermission() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlClientPermissionAttribute() {
|
||||
// FIXME: destructor to release resources
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,45 +2,379 @@
|
||||
// System.Data.SqlClient.SqlCommand.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya (rd[email protected])
|
||||
// Rodrigo Moya (rod[email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
// use #define DEBUG_SqlCommand if you want to spew debug messages
|
||||
// #define DEBUG_SqlCommand
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Xml;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SQL statement that is executed while connected to a SQL database.
|
||||
/// Represents a SQL statement that is executed
|
||||
/// while connected to a SQL database.
|
||||
/// </summary>
|
||||
public class SqlCommand : IDbCommand
|
||||
// public sealed class SqlCommand : Component, IDbCommand, ICloneable
|
||||
public sealed class SqlCommand : IDbCommand
|
||||
{
|
||||
void Cancel();
|
||||
// FIXME: Console.WriteLine() is used for debugging throughout
|
||||
|
||||
#region Fields
|
||||
|
||||
string sql = "";
|
||||
int timeout = 30;
|
||||
// default is 30 seconds
|
||||
// for command execution
|
||||
|
||||
SqlConnection conn = null;
|
||||
SqlTransaction trans = null;
|
||||
CommandType cmdType = CommandType.Text;
|
||||
bool designTime = false;
|
||||
SqlParameterCollection parmCollection = new
|
||||
SqlParameterCollection();
|
||||
|
||||
#endregion // Fields
|
||||
|
||||
#region Constructors
|
||||
|
||||
public SqlCommand()
|
||||
{
|
||||
sql = "";
|
||||
}
|
||||
|
||||
public SqlCommand (string cmdText)
|
||||
{
|
||||
sql = cmdText;
|
||||
}
|
||||
|
||||
public SqlCommand (string cmdText, SqlConnection connection)
|
||||
{
|
||||
sql = cmdText;
|
||||
conn = connection;
|
||||
}
|
||||
|
||||
public SqlCommand (string cmdText, SqlConnection connection,
|
||||
SqlTransaction transaction)
|
||||
{
|
||||
sql = cmdText;
|
||||
conn = connection;
|
||||
trans = transaction;
|
||||
}
|
||||
|
||||
#endregion // Constructors
|
||||
|
||||
#region Methods
|
||||
|
||||
[MonoTODO]
|
||||
public void Cancel ()
|
||||
{
|
||||
// FIXME: use non-blocking Exec for this
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
// FIXME: is this the correct way to return a stronger type?
|
||||
[MonoTODO]
|
||||
IDbDataParameter IDbCommand.CreateParameter ()
|
||||
{
|
||||
return CreateParameter ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter CreateParameter ()
|
||||
{
|
||||
return new SqlParameter ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int ExecuteNonQuery ()
|
||||
{
|
||||
IntPtr pgResult; // PGresult
|
||||
int rowsAffected = -1;
|
||||
ExecStatusType execStatus;
|
||||
String rowsAffectedString;
|
||||
|
||||
if(conn.State != ConnectionState.Open)
|
||||
throw new InvalidOperationException(
|
||||
"ConnnectionState is not Open");
|
||||
|
||||
// FIXME: PQexec blocks
|
||||
// while PQsendQuery is non-blocking
|
||||
// which is better to use?
|
||||
// int PQsendQuery(PGconn *conn,
|
||||
// const char *query);
|
||||
|
||||
// execute SQL command
|
||||
// uses internal property to get the PGConn IntPtr
|
||||
pgResult = PostgresLibrary.
|
||||
PQexec (conn.PostgresConnection, sql);
|
||||
|
||||
execStatus = PostgresLibrary.
|
||||
PQresultStatus (pgResult);
|
||||
|
||||
if(execStatus == ExecStatusType.PGRES_COMMAND_OK)
|
||||
{
|
||||
rowsAffectedString = PostgresLibrary.
|
||||
PQcmdTuples (pgResult);
|
||||
#if DEBUG_SqlCommand
|
||||
Console.WriteLine("rowsAffectedString: " +
|
||||
rowsAffectedString);
|
||||
#endif // DEBUG_SqlCommand
|
||||
if(rowsAffectedString != null)
|
||||
if(rowsAffectedString.Equals("") == false)
|
||||
rowsAffected = int.Parse(rowsAffectedString);
|
||||
}
|
||||
else
|
||||
{
|
||||
String errorMessage;
|
||||
|
||||
errorMessage = PostgresLibrary.
|
||||
PQresStatus(execStatus);
|
||||
|
||||
errorMessage += " " + PostgresLibrary.
|
||||
PQresultErrorMessage(pgResult);
|
||||
|
||||
throw new SqlException(0, 0,
|
||||
errorMessage, 0, "",
|
||||
conn.DataSource, "SqlCommand", 0);
|
||||
}
|
||||
#if DEBUG_SqlCommand
|
||||
String cmdStatus;
|
||||
cmdStatus = PostgresLibrary.
|
||||
PQcmdStatus(pgResult);
|
||||
|
||||
Console.WriteLine("*** Command Status: " +
|
||||
cmdStatus);
|
||||
#endif // DEBUG_SqlCommand
|
||||
PostgresLibrary.PQclear (pgResult);
|
||||
|
||||
// FIXME: get number of rows
|
||||
// affected for INSERT, UPDATE, or DELETE
|
||||
// any other, return -1 (such as, CREATE TABLE)
|
||||
return rowsAffected;
|
||||
}
|
||||
|
||||
SqlParameter CreateParameter();
|
||||
// FIXME: temporarily commmented out, so I could get a simple working
|
||||
// SqlConnection and SqlCommand. I had to temporarily
|
||||
// comment it out the ExecuteReader in IDbCommand as well.
|
||||
/*
|
||||
[MonoTODO]
|
||||
IDataReader IDbCommand.ExecuteReader ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
SqlDataReader ExecuteReader ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
IDataReader IDbCommand.ExecuteReader (
|
||||
CommandBehavior behavior)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlDataReader ExecuteReader (CommandBehavior behavior)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
*/
|
||||
|
||||
[MonoTODO]
|
||||
public object ExecuteScalar ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public XmlReader ExecuteXmlReader ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Prepare ()
|
||||
{
|
||||
// FIXME: parameters have to be implemented for this
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommand Clone ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#endregion // Methods
|
||||
|
||||
#region Properties
|
||||
|
||||
public string CommandText {
|
||||
get {
|
||||
return sql;
|
||||
}
|
||||
|
||||
set {
|
||||
sql = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int CommandTimeout {
|
||||
get {
|
||||
return timeout;
|
||||
}
|
||||
|
||||
set {
|
||||
// FIXME: if value < 0, throw
|
||||
// ArgumentException
|
||||
// if (value < 0)
|
||||
// throw ArgumentException;
|
||||
timeout = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CommandType CommandType {
|
||||
get {
|
||||
return cmdType;
|
||||
}
|
||||
|
||||
set {
|
||||
cmdType = value;
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: for property Connection, is this the correct
|
||||
// way to handle a return of a stronger type?
|
||||
IDbConnection IDbCommand.Connection {
|
||||
get {
|
||||
return Connection;
|
||||
}
|
||||
|
||||
set {
|
||||
// FIXME: throw an InvalidOperationException
|
||||
// if the change was during a
|
||||
// transaction in progress
|
||||
|
||||
// csc
|
||||
Connection = (SqlConnection) value;
|
||||
// mcs
|
||||
// Connection = value;
|
||||
|
||||
// FIXME: set Transaction property to null
|
||||
}
|
||||
}
|
||||
|
||||
int ExecuteNonQuery();
|
||||
public SqlConnection Connection {
|
||||
get {
|
||||
// conn defaults to null
|
||||
return conn;
|
||||
}
|
||||
|
||||
SqlDataReader ExecuteReader();
|
||||
set {
|
||||
// FIXME: throw an InvalidOperationException
|
||||
// if the change was during
|
||||
// a transaction in progress
|
||||
conn = value;
|
||||
// FIXME: set Transaction property to null
|
||||
}
|
||||
}
|
||||
|
||||
SqlDataReader ExecuteReader(CommandBehavior behavior);
|
||||
public bool DesignTimeVisible {
|
||||
get {
|
||||
return designTime;
|
||||
}
|
||||
|
||||
set{
|
||||
designTime = value;
|
||||
}
|
||||
}
|
||||
|
||||
object ExecuteScalar();
|
||||
// FIXME; for property Parameters, is this the correct
|
||||
// way to handle a stronger return type?
|
||||
IDataParameterCollection IDbCommand.Parameters {
|
||||
get {
|
||||
return Parameters;
|
||||
}
|
||||
}
|
||||
|
||||
void Prepare();
|
||||
SqlParameterCollection Parameters {
|
||||
get {
|
||||
return parmCollection;
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: for property Transaction, is this the correct
|
||||
// way to handle a return of a stronger type?
|
||||
IDbTransaction IDbCommand.Transaction {
|
||||
get {
|
||||
return Transaction;
|
||||
}
|
||||
|
||||
string CommandText{get; set;}
|
||||
set {
|
||||
// FIXME: error handling - do not allow
|
||||
// setting of transaction if transaction
|
||||
// has already begun
|
||||
|
||||
int CommandTimeout{get; set;}
|
||||
// csc
|
||||
Transaction = (SqlTransaction) value;
|
||||
// mcs
|
||||
// Transaction = value;
|
||||
}
|
||||
}
|
||||
|
||||
CommandType CommandType{get; set;}
|
||||
public SqlTransaction Transaction {
|
||||
get {
|
||||
return trans;
|
||||
}
|
||||
|
||||
SqlConnection Connection{get; set;}
|
||||
set {
|
||||
// FIXME: error handling
|
||||
trans = value;
|
||||
}
|
||||
}
|
||||
|
||||
SqlParameterCollection Parameters{get;}
|
||||
[MonoTODO]
|
||||
public UpdateRowSource UpdatedRowSource {
|
||||
// FIXME: do this once DbDataAdaptor
|
||||
// and DataRow are done
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
IDbTransaction Transaction{get; set;}
|
||||
#endregion // Properties
|
||||
|
||||
UpdateRowSource UpdatedRowSource{get; set;}
|
||||
#region Destructors
|
||||
|
||||
[MonoTODO]
|
||||
public void Dispose() {
|
||||
// FIXME: need proper way to release resources
|
||||
// Dispose(true);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlCommand()
|
||||
{
|
||||
// FIXME: need proper way to release resources
|
||||
// Dispose(false);
|
||||
}
|
||||
|
||||
#endregion //Destructors
|
||||
}
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlCommandBuilder.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Data.SqlClient {
|
||||
|
||||
/// <summary>
|
||||
/// Builder of one command
|
||||
/// that will be used in manipulating a table for
|
||||
/// a DataSet that is assoicated with a database.
|
||||
/// </summary>
|
||||
public sealed class SqlCommandBuilder : Component {
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommandBuilder() {
|
||||
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommandBuilder(SqlDataAdapter adapter) {
|
||||
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlDataAdapter DataAdapter {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string QuotePrefix {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string QuoteSuffix {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static void DeriveParameters(SqlCommand command) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommand GetDeleteCommand() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommand GetInsertCommand() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommand GetUpdateCommand() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void RefreshSchema() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected override void Dispose(bool disposing) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlCommandBuilder() {
|
||||
// FIXME: create destructor - release resources
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+501
-12
@@ -3,37 +3,526 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
// use #define DEBUG_SqlConnection if you want to spew debug messages
|
||||
// #define DEBUG_SqlConnection
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
// using PGconn = IntPtr;
|
||||
// PGconn is native C library type in libpq for Postgres Connection
|
||||
|
||||
// using PGressult = IntPtr;
|
||||
// PGresult is native C library type in libpq for Postgres Resultset
|
||||
|
||||
/// <summary>
|
||||
/// Represents an open connection to a SQL data source
|
||||
/// </summary>
|
||||
public class SqlConnection : IDBConnection
|
||||
//public sealed class SqlConnection : Component, IDbConnection,
|
||||
// ICloneable
|
||||
public sealed class SqlConnection : IDbConnection
|
||||
{
|
||||
SqlTransaction BeginTransaction();
|
||||
// FIXME: Need to implement class Component,
|
||||
// and interfaces: ICloneable and IDisposable
|
||||
|
||||
SqlTransaction BeginTransaction(IsolationLevel il);
|
||||
#region Fields
|
||||
|
||||
void ChangeDatabase(string databaseName);
|
||||
private IntPtr pgConn = IntPtr.Zero;
|
||||
// PGConn (Postgres Connection)
|
||||
private string connectionString = "";
|
||||
// OLE DB Connection String
|
||||
private string pgConnectionString = "";
|
||||
// PostgreSQL Connection String
|
||||
private SqlTransaction trans = null;
|
||||
private int connectionTimeout = 15;
|
||||
// default for 15 seconds
|
||||
|
||||
// connection parameters in connection string
|
||||
private string host = "";
|
||||
// Name of host to connect to
|
||||
private string hostaddr = "";
|
||||
// IP address of host to connect to
|
||||
// should be in "n.n.n.n" format
|
||||
private string port = "";
|
||||
// Port number to connect to at the server host
|
||||
private string dbname = ""; // The database name.
|
||||
private string user = ""; // User name to connect as.
|
||||
private string password = "";
|
||||
// Password to be used if the server
|
||||
// demands password authentication.
|
||||
private string options = "";
|
||||
// Trace/debug options to be sent to the server.
|
||||
private string tty = "";
|
||||
// A file or tty for optional
|
||||
// debug output from the backend.
|
||||
private string requiressl = "";
|
||||
// Set to 1 to require
|
||||
// SSL connection to the backend.
|
||||
// Libpq will then refuse to connect
|
||||
// if the server does not
|
||||
// support SSL. Set to 0 (default) to
|
||||
// negotiate with server.
|
||||
|
||||
void Close();
|
||||
ConnectionState conState = ConnectionState.Closed;
|
||||
|
||||
SqlCommand CreateCommand();
|
||||
#endregion // Fields
|
||||
|
||||
void Open();
|
||||
#region Constructors
|
||||
|
||||
/*
|
||||
[MonoTODO]
|
||||
public SqlConnection ()
|
||||
{
|
||||
this.ConnectionString = null;
|
||||
this.ConnectionTimeout = 0;
|
||||
this.Database = null;
|
||||
this.State = 0;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlConnection (string cs) : SqlConnection ()
|
||||
{
|
||||
this.ConnectionString = cs;
|
||||
}
|
||||
|
||||
*/
|
||||
// A lot of the defaults were initialized in the Fields
|
||||
[MonoTODO]
|
||||
public SqlConnection ()
|
||||
{
|
||||
|
||||
string ConnectionString{get; set;}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlConnection (String connectionString)
|
||||
{
|
||||
SetConnectionString (connectionString);
|
||||
}
|
||||
|
||||
int ConnectionTimeout{get;}
|
||||
#endregion // Constructors
|
||||
|
||||
string Database{get;}
|
||||
#region Destructors
|
||||
|
||||
ConnectionState State{get;}
|
||||
[MonoTODO]
|
||||
public void Dispose () {
|
||||
// FIXME: release resources properly
|
||||
Close ();
|
||||
// Dispose (true);
|
||||
}
|
||||
|
||||
// aka Finalize
|
||||
// [ClassInterface(ClassInterfaceType.AutoDual)]
|
||||
[MonoTODO]
|
||||
~SqlConnection()
|
||||
{
|
||||
// FIXME: this class need
|
||||
// a destructor to release resources
|
||||
// Also, take a look at Dispose
|
||||
// Dispose (false);
|
||||
}
|
||||
|
||||
#endregion // Destructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
IDbTransaction IDbConnection.BeginTransaction ()
|
||||
{
|
||||
return BeginTransaction ();
|
||||
}
|
||||
|
||||
public SqlTransaction BeginTransaction ()
|
||||
{
|
||||
return TransactionBegin (); // call private method
|
||||
}
|
||||
|
||||
IDbTransaction IDbConnection.BeginTransaction (IsolationLevel
|
||||
il)
|
||||
{
|
||||
return BeginTransaction (il);
|
||||
}
|
||||
|
||||
public SqlTransaction BeginTransaction (IsolationLevel il)
|
||||
{
|
||||
return TransactionBegin (il); // call private method
|
||||
}
|
||||
|
||||
// PostgreSQL does not support named transactions/savepoint
|
||||
// nor nested transactions
|
||||
[Obsolete]
|
||||
public SqlTransaction BeginTransaction(string transactionName) {
|
||||
return TransactionBegin (); // call private method
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public SqlTransaction BeginTransaction(IsolationLevel iso,
|
||||
string transactionName) {
|
||||
return TransactionBegin (iso); // call private method
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void ChangeDatabase (string databaseName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Close ()
|
||||
{
|
||||
CloseDataSource ();
|
||||
}
|
||||
|
||||
IDbCommand IDbConnection.CreateCommand ()
|
||||
{
|
||||
return CreateCommand ();
|
||||
}
|
||||
|
||||
public SqlCommand CreateCommand ()
|
||||
{
|
||||
SqlCommand sqlcmd = new SqlCommand ("", this);
|
||||
|
||||
return sqlcmd;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Open ()
|
||||
{
|
||||
OpenDataSource ();
|
||||
}
|
||||
|
||||
#endregion // Public Methods
|
||||
|
||||
#region Internal Methods
|
||||
|
||||
// this is for System.Data.SqlClient classes
|
||||
// to get the Postgres connection
|
||||
internal IntPtr PostgresConnection {
|
||||
get {
|
||||
return pgConn;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // Internal Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
// FIXME: protected override void Dispose overrides Component
|
||||
// however, including Component causes other problems
|
||||
/*
|
||||
[MonoTODO]
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void OpenDataSource ()
|
||||
{
|
||||
if(dbname.Equals(""))
|
||||
throw new InvalidOperationException(
|
||||
"dbname missing");
|
||||
else if(conState == ConnectionState.Open)
|
||||
throw new InvalidOperationException(
|
||||
"ConnnectionState is already Open");
|
||||
|
||||
ConnStatusType connStatus;
|
||||
|
||||
// FIXME: check to make sure we have
|
||||
// everything to connect,
|
||||
// otherwise, throw an exception
|
||||
|
||||
pgConn = PostgresLibrary.PQconnectdb
|
||||
(pgConnectionString);
|
||||
|
||||
// FIXME: should we use PQconnectStart/PQconnectPoll
|
||||
// instead of PQconnectdb?
|
||||
// PQconnectdb blocks
|
||||
// PQconnectStart/PQconnectPoll is non-blocking
|
||||
|
||||
connStatus = PostgresLibrary.PQstatus (pgConn);
|
||||
if(connStatus == ConnStatusType.CONNECTION_OK)
|
||||
{
|
||||
// Successfully Connected
|
||||
conState = ConnectionState.Open;
|
||||
}
|
||||
else
|
||||
{
|
||||
String errorMessage = PostgresLibrary.
|
||||
PQerrorMessage (pgConn);
|
||||
errorMessage += ": Could not connect to database.";
|
||||
|
||||
throw new SqlException(0, 0,
|
||||
errorMessage, 0, "",
|
||||
host, "SqlConnection", 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void CloseDataSource ()
|
||||
{
|
||||
// FIXME: just a quick hack
|
||||
conState = ConnectionState.Closed;
|
||||
PostgresLibrary.PQfinish (pgConn);
|
||||
}
|
||||
|
||||
private void SetConnectionString (string connectionString)
|
||||
{
|
||||
// FIXME: perform error checking on string
|
||||
// while translating string from
|
||||
// OLE DB format to PostgreSQL
|
||||
// connection string format
|
||||
//
|
||||
// OLE DB: "host=localhost;dbname=test;user=joe;password=smoe"
|
||||
// PostgreSQL: "host=localhost dbname=test user=joe password=smoe"
|
||||
//
|
||||
// For OLE DB, you would have the additional
|
||||
// "provider=postgresql"
|
||||
// OleDbConnection you would be using libgda, maybe
|
||||
// it would be
|
||||
// "provider=OAFIID:GNOME_Database_Postgres_Provider"
|
||||
// instead.
|
||||
//
|
||||
// Also, parse the connection string into properties
|
||||
|
||||
// FIXME: if connection is open, you can
|
||||
// not set the connection
|
||||
// string, throw an exception
|
||||
|
||||
this.connectionString = connectionString;
|
||||
pgConnectionString = ConvertStringToPostgres (
|
||||
connectionString);
|
||||
|
||||
#if DEBUG_SqlConnection
|
||||
Console.WriteLine(
|
||||
"OLE-DB Connection String [in]: " +
|
||||
this.ConnectionString);
|
||||
Console.WriteLine(
|
||||
"Postgres Connection String [out]: " +
|
||||
pgConnectionString);
|
||||
#endif // DEBUG_SqlConnection
|
||||
}
|
||||
|
||||
private String ConvertStringToPostgres (String
|
||||
oleDbConnectionString)
|
||||
{
|
||||
StringBuilder postgresConnection =
|
||||
new StringBuilder();
|
||||
string result;
|
||||
string[] connectionParameters;
|
||||
|
||||
char[] semicolon = new Char[1];
|
||||
semicolon[0] = ';';
|
||||
|
||||
// FIXME: what is the max number of value pairs
|
||||
// can there be for the OLE DB
|
||||
// connnection string? what about libgda max?
|
||||
// what about postgres max?
|
||||
|
||||
// FIXME: currently assuming value pairs are like:
|
||||
// "key1=value1;key2=value2;key3=value3"
|
||||
// Need to deal with values that have
|
||||
// single or double quotes. And error
|
||||
// handling of that too.
|
||||
// "key1=value1;key2='value2';key=\"value3\""
|
||||
|
||||
// FIXME: put the connection parameters
|
||||
// from the connection
|
||||
// string into a
|
||||
// Hashtable (System.Collections)
|
||||
// instead of using private variables
|
||||
// to store them
|
||||
connectionParameters = oleDbConnectionString.
|
||||
Split (semicolon);
|
||||
foreach (string sParameter in connectionParameters) {
|
||||
if(sParameter.Length > 0) {
|
||||
BreakConnectionParameter (sParameter);
|
||||
postgresConnection.
|
||||
Append (sParameter +
|
||||
" ");
|
||||
}
|
||||
}
|
||||
result = postgresConnection.ToString ();
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool BreakConnectionParameter (String sParameter)
|
||||
{
|
||||
bool addParm = true;
|
||||
int index;
|
||||
|
||||
index = sParameter.IndexOf ("=");
|
||||
if (index > 0) {
|
||||
string parmKey, parmValue;
|
||||
|
||||
// separate string "key=value" to
|
||||
// string "key" and "value"
|
||||
parmKey = sParameter.Substring (0, index);
|
||||
parmValue = sParameter.Substring (index + 1,
|
||||
sParameter.Length - index - 1);
|
||||
|
||||
switch(parmKey.ToLower()) {
|
||||
case "hostaddr":
|
||||
hostaddr = parmValue;
|
||||
break;
|
||||
|
||||
case "port":
|
||||
port = parmValue;
|
||||
break;
|
||||
|
||||
case "host":
|
||||
// set DataSource property
|
||||
host = parmValue;
|
||||
break;
|
||||
|
||||
case "dbname":
|
||||
// set Database property
|
||||
dbname = parmValue;
|
||||
break;
|
||||
|
||||
case "user":
|
||||
user = parmValue;
|
||||
break;
|
||||
|
||||
case "password":
|
||||
password = parmValue;
|
||||
// addParm = false;
|
||||
break;
|
||||
|
||||
case "options":
|
||||
options = parmValue;
|
||||
break;
|
||||
|
||||
case "tty":
|
||||
tty = parmValue;
|
||||
break;
|
||||
|
||||
case "requiressl":
|
||||
requiressl = parmValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return addParm;
|
||||
}
|
||||
|
||||
private SqlTransaction TransactionBegin ()
|
||||
{
|
||||
// FIXME: need to keep track of
|
||||
// transaction in-progress
|
||||
trans = new SqlTransaction ();
|
||||
// using internal methods of SqlTransaction
|
||||
trans.SetConnection (this);
|
||||
trans.Begin();
|
||||
|
||||
return trans;
|
||||
}
|
||||
|
||||
private SqlTransaction TransactionBegin (IsolationLevel il)
|
||||
{
|
||||
// FIXME: need to keep track of
|
||||
// transaction in-progress
|
||||
TransactionBegin();
|
||||
trans.SetIsolationLevel (il);
|
||||
|
||||
return trans;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
[MonoTODO]
|
||||
public ConnectionState State {
|
||||
get {
|
||||
return conState;
|
||||
}
|
||||
}
|
||||
|
||||
public string ConnectionString {
|
||||
get {
|
||||
return connectionString;
|
||||
}
|
||||
set {
|
||||
SetConnectionString (value);
|
||||
}
|
||||
}
|
||||
|
||||
public int ConnectionTimeout {
|
||||
get {
|
||||
return connectionTimeout;
|
||||
}
|
||||
}
|
||||
|
||||
public string Database {
|
||||
get {
|
||||
return dbname;
|
||||
}
|
||||
}
|
||||
|
||||
public string DataSource {
|
||||
get {
|
||||
return host;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: this is here because of Component?
|
||||
[MonoTODO]
|
||||
protected bool DesignMode {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
*/
|
||||
public int PacketSize {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public string ServerVersion {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal SqlTransaction Transaction {
|
||||
get {
|
||||
return trans;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events and Delegates
|
||||
|
||||
// FIXME: the two events belong here
|
||||
// however, i do not know about the delegates
|
||||
// also, they are stubs for now
|
||||
/*
|
||||
public delegate void
|
||||
SqlInfoMessageEventHandler (object sender,
|
||||
SqlInfoMessageEventArgs e);
|
||||
|
||||
public event
|
||||
SqlInfoMessageEventHandler InfoMessage;
|
||||
|
||||
public event
|
||||
StateChangeEventHandler StateChange;
|
||||
*/
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+213
-7
@@ -3,23 +3,229 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a set of command-related properties that are used to fill the DataSet and update a data source, all this from a SQL database.
|
||||
/// Represents a set of command-related properties that are used
|
||||
/// to fill the DataSet and update a data source, all this
|
||||
/// from a SQL database.
|
||||
/// </summary>
|
||||
public class SqlDataAdapter : IDbDataAdapter
|
||||
public sealed class SqlDataAdapter : DbDataAdapter, IDbDataAdapter
|
||||
{
|
||||
SqlCommand DeleteCommand{get; set;}
|
||||
#region Properties
|
||||
|
||||
SqlCommand InsertCommand{get; set;}
|
||||
[MonoTODO]
|
||||
public SqlCommand DeleteCommand {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
SqlCommand SelectCommand{get; set;}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommand InsertCommand {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommand SelectCommand {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public SqlCommand UpdateCommand {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // Properties
|
||||
|
||||
#region Methods
|
||||
|
||||
[MonoTODO]
|
||||
public override int Fill(DataSet dataSet) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Fill(DataTable dataTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Fill(DataSet dataSet, string srcTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Fill(DataTable dataTable,
|
||||
IDataReader dataReader) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Fill(DataTable dataTable,
|
||||
IDbCommand command,
|
||||
CommandBehavior behavior) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Fill(DataSet dataSet, int startRecord,
|
||||
int maxRecords, string srcTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Fill(DataSet dataSet,
|
||||
string srcTable, IDataReader dataReader,
|
||||
int startRecord, int maxRecords) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Fill(DataSet dataSet,
|
||||
int startRecord, int maxRecords,
|
||||
string srcTable, IDbCommand command,
|
||||
CommandBehavior behavior) {
|
||||
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override DataTable[] FillSchema(DataSet dataSet,
|
||||
SchemaType schemaType) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTable FillSchema(DataTable dataTable,
|
||||
SchemaType schemaType) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTable[] FillSchema(DataSet dataSet,
|
||||
SchemaType schemaType, string srcTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual DataTable FillSchema(DataTable dataTable,
|
||||
SchemaType schemaType, IDbCommand command,
|
||||
CommandBehavior behavior) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual DataTable[] FillSchema(DataSet dataSet,
|
||||
SchemaType schemaType, IDbCommand command,
|
||||
string srcTable, CommandBehavior behavior) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IDataParameter[] GetFillParameters() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Update(DataRow[] dataRows) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override int Update(DataSet dataSet) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Update(DataTable dataTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Update(DataRow[] dataRows,
|
||||
DataTableMapping tableMapping) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Update(DataSet dataSet, string srcTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected override RowUpdatedEventArgs CreateRowUpdatedEvent(
|
||||
DataRow dataRow,
|
||||
IDbCommand command,
|
||||
StatementType statementType,
|
||||
DataTableMapping tableMapping) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected override RowUpdatingEventArgs CreateRowUpdatingEvent(
|
||||
DataRow dataRow,
|
||||
IDbCommand command,
|
||||
StatementType statementType,
|
||||
DataTableMapping tableMapping) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual void OnFillError(FillErrorEventArgs value) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
protected override void OnRowUpdated(RowUpdatedEventArgs value) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
protected override void OnRowUpdating(RowUpdatingEventArgs value) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#endregion // Methods
|
||||
|
||||
#region Events and Delegates
|
||||
|
||||
public event FillErrorEventHandler FillError;
|
||||
|
||||
public event SqlRowUpdatedEventHandler RowUpdated;
|
||||
|
||||
public event SqlRowUpdatingEventHandler RowUpdating;
|
||||
|
||||
#endregion // Events and Delegates
|
||||
|
||||
SqlCommand UpdateCommand{get; set;}
|
||||
}
|
||||
}
|
||||
+242
-12
@@ -3,31 +3,261 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a SQL database.
|
||||
/// Provides a means of reading one or more forward-only streams
|
||||
/// of result sets obtained by executing a command
|
||||
/// at a SQL database.
|
||||
/// </summary>
|
||||
public interface SqlDataReader : IDataReader
|
||||
//public sealed class SqlDataReader : MarshalByRefObject,
|
||||
// IEnumerable, IDataReader, IDisposable, IDataRecord
|
||||
public sealed class SqlDataReader : IEnumerable,
|
||||
IDataReader, IDataRecord
|
||||
{
|
||||
void Close();
|
||||
|
||||
DataTable GetSchemaTable();
|
||||
|
||||
bool NextResult();
|
||||
#region Fields
|
||||
|
||||
bool Read();
|
||||
DataTable tableSchema;
|
||||
DataTable tableRow;
|
||||
|
||||
int Depth{get;}
|
||||
#endregion // Fields
|
||||
|
||||
bool IsClosed{get;}
|
||||
#region Public Methods
|
||||
|
||||
int RecordsAffected{get;}
|
||||
[MonoTODO]
|
||||
public void Close()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTable GetSchemaTable()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool NextResult()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool Read()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public byte GetByte(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public long GetBytes(int i, long fieldOffset,
|
||||
byte[] buffer, int bufferOffset,
|
||||
int length)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public char GetChar(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public long GetChars(int i, long fieldOffset,
|
||||
char[] buffer, int bufferOffset,
|
||||
int length)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public IDataReader GetData(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string GetDataTypeName(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DateTime GetDateTime(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public decimal GetDecimal(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public double GetDouble(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public Type GetFieldType(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public float GetFloat(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public Guid GetGuid(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public short GetInt16(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int GetInt32(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public long GetInt64(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string GetName(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int GetOrdinal(string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string GetString(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public object GetValue(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int GetValues(object[] values)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool IsDBNull(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool GetBoolean(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public IEnumerator GetEnumerator() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#endregion // Public Methods
|
||||
|
||||
#region // Destructors
|
||||
|
||||
[MonoTODO]
|
||||
public void Dispose () {
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlDataReader() {
|
||||
}
|
||||
|
||||
#endregion // Destructors
|
||||
|
||||
|
||||
#region Properties
|
||||
|
||||
public int Depth {
|
||||
[MonoTODO]
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsClosed {
|
||||
[MonoTODO]
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public int RecordsAffected {
|
||||
[MonoTODO]
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public int FieldCount {
|
||||
[MonoTODO]
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public object this[string name] {
|
||||
[MonoTODO]
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public object this[int i] {
|
||||
[MonoTODO]
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // Properties
|
||||
}
|
||||
}
|
||||
@@ -3,18 +3,153 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes an error from a SQL database.
|
||||
/// </summary>
|
||||
public class SqlError
|
||||
[MonoTODO]
|
||||
public sealed class SqlError
|
||||
{
|
||||
// TODO
|
||||
byte theClass = 0;
|
||||
int lineNumber = 0;
|
||||
string message = "";
|
||||
int number = 0;
|
||||
string procedure = "";
|
||||
string server = "";
|
||||
string source = "";
|
||||
byte state = 0;
|
||||
|
||||
internal SqlError(byte theClass, int lineNumber,
|
||||
string message, int number, string procedure,
|
||||
string server, string source, byte state) {
|
||||
this.theClass = theClass;
|
||||
this.lineNumber = lineNumber;
|
||||
this.message = message;
|
||||
this.number = number;
|
||||
this.procedure = procedure;
|
||||
this.server = server;
|
||||
this.source = source;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
[MonoTODO]
|
||||
/// <summary>
|
||||
/// severity level of the error
|
||||
/// </summary>
|
||||
public byte Class {
|
||||
get {
|
||||
return theClass;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int LineNumber {
|
||||
get {
|
||||
return lineNumber;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Message {
|
||||
get {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Number {
|
||||
get {
|
||||
return number;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Procedure {
|
||||
get {
|
||||
return procedure;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Server {
|
||||
get {
|
||||
return server;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Source {
|
||||
get {
|
||||
return source;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public byte State {
|
||||
get {
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
[MonoTODO]
|
||||
public override string ToString ()
|
||||
{
|
||||
String toStr;
|
||||
String stackTrace;
|
||||
stackTrace = " <Stack Trace>";
|
||||
// FIXME: generate the correct SQL error string
|
||||
toStr = "SqlError:" + message + stackTrace;
|
||||
return toStr;
|
||||
}
|
||||
|
||||
internal void SetClass(byte theClass) {
|
||||
this.theClass = theClass;
|
||||
}
|
||||
|
||||
internal void SetLineNumber(int lineNumber) {
|
||||
this.lineNumber = lineNumber;
|
||||
}
|
||||
|
||||
internal void SetMessage(string message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
internal void SetNumber(int number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
internal void SetProcedure(string procedure) {
|
||||
this.procedure = procedure;
|
||||
}
|
||||
|
||||
internal void SetServer(string server) {
|
||||
this.server = server;
|
||||
}
|
||||
|
||||
internal void SetSource(string source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
internal void SetState(byte state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlError.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes an error from a SQL database.
|
||||
/// </summary>
|
||||
[MonoTODO]
|
||||
public sealed class SqlErrorCollection : ICollection, IEnumerable
|
||||
{
|
||||
ArrayList errorList = new ArrayList();
|
||||
|
||||
internal SqlErrorCollection() {
|
||||
}
|
||||
|
||||
internal SqlErrorCollection(byte theClass, int lineNumber,
|
||||
string message, int number, string procedure,
|
||||
string server, string source, byte state) {
|
||||
|
||||
Add (theClass, lineNumber, message,
|
||||
number, procedure,
|
||||
server, source, state);
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
[MonoTODO]
|
||||
public int Count {
|
||||
get {
|
||||
return errorList.Count;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void CopyTo(Array array, int index) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
// [MonoTODO]
|
||||
bool ICollection.IsSynchronized {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
// [MonoTODO]
|
||||
object ICollection.SyncRoot {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public IEnumerator GetEnumerator() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
// Index property (indexer)
|
||||
// [MonoTODO]
|
||||
public SqlError this[int index] {
|
||||
get {
|
||||
return (SqlError) errorList[index];
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
[MonoTODO]
|
||||
public override string ToString()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
#endregion
|
||||
|
||||
internal void Add(SqlError error) {
|
||||
errorList.Add(error);
|
||||
}
|
||||
|
||||
internal void Add(byte theClass, int lineNumber,
|
||||
string message, int number, string procedure,
|
||||
string server, string source, byte state) {
|
||||
|
||||
SqlError error = new SqlError(theClass,
|
||||
lineNumber, message,
|
||||
number, procedure,
|
||||
server, source, state);
|
||||
Add(error);
|
||||
}
|
||||
|
||||
#region Destructors
|
||||
|
||||
[MonoTODO]
|
||||
~SqlErrorCollection()
|
||||
{
|
||||
// FIXME: do the destructor - release resources
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -3,18 +3,200 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Exceptions, as returned by SQL databases.
|
||||
/// </summary>
|
||||
public class SqlException : SystemException
|
||||
public sealed class SqlException : SystemException
|
||||
{
|
||||
// TODO
|
||||
private SqlErrorCollection errors;
|
||||
|
||||
internal SqlException() {
|
||||
errors = new SqlErrorCollection();
|
||||
}
|
||||
|
||||
internal SqlException(byte theClass, int lineNumber,
|
||||
string message, int number, string procedure,
|
||||
string server, string source, byte state) {
|
||||
|
||||
errors = new SqlErrorCollection (theClass,
|
||||
lineNumber, message,
|
||||
number, procedure,
|
||||
server, source, state);
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
[MonoTODO]
|
||||
public byte Class {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return 0; // FIXME: throw exception here?
|
||||
else
|
||||
return errors[0].Class;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetClass(value);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlErrorCollection Errors {
|
||||
get {
|
||||
return errors;
|
||||
}
|
||||
|
||||
set {
|
||||
errors = value;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int LineNumber {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return 0; // FIXME: throw exception here?
|
||||
return errors[0].LineNumber;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetLineNumber(value);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override string Message {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return ""; // FIXME: throw exception?
|
||||
else {
|
||||
String msg = "";
|
||||
int i = 0;
|
||||
|
||||
for(i = 0; i < errors.Count - 1; i++) {
|
||||
msg = msg + errors[i].Message + "\n";
|
||||
}
|
||||
msg = msg + errors[i].Message;
|
||||
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Number {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return 0; // FIXME: throw exception?
|
||||
else
|
||||
return errors[0].Number;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetNumber(value);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Procedure {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return ""; // FIXME: throw exception?
|
||||
else
|
||||
return errors[0].Procedure;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetProcedure(value);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Server {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return ""; // FIXME: throw exception?
|
||||
else
|
||||
return errors[0].Server;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetServer(value);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override string Source {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return ""; // FIXME: throw exception?
|
||||
else
|
||||
return errors[0].Source;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetSource(value);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public byte State {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return 0; // FIXME: throw exception?
|
||||
else
|
||||
return errors[0].State;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetState(value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // Properties
|
||||
|
||||
#region Methods
|
||||
|
||||
[MonoTODO]
|
||||
public override void GetObjectData(SerializationInfo si,
|
||||
StreamingContext context) {
|
||||
// FIXME: to do
|
||||
}
|
||||
|
||||
// [Serializable]
|
||||
// [ClassInterface(ClassInterfaceType.AutoDual)]
|
||||
public override string ToString() {
|
||||
String toStr = "";
|
||||
for (int i = 0; i < errors.Count; i++) {
|
||||
toStr = toStr + errors[i].ToString() + "\n";
|
||||
}
|
||||
return toStr;
|
||||
}
|
||||
|
||||
internal void Add(byte theClass, int lineNumber,
|
||||
string message, int number, string procedure,
|
||||
string server, string source, byte state) {
|
||||
|
||||
errors.Add (theClass, lineNumber, message,
|
||||
number, procedure,
|
||||
server, source, state);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlException() {
|
||||
// FIXME: destructor to release resources
|
||||
}
|
||||
|
||||
#endregion // Methods
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlInfoMessageEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public sealed class SqlInfoMessageEventArgs : EventArgs
|
||||
{
|
||||
[MonoTODO]
|
||||
public SqlErrorCollection Errors {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Message
|
||||
{
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Source {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override string ToString() {
|
||||
// representation of InfoMessage event
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlInfoMessageEventArgs() {
|
||||
// FIXME: destructor needs to release resources
|
||||
}
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlInfoMessageEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public delegate void
|
||||
SqlInfoMessageEventHandler (object sender,
|
||||
SqlInfoMessageEventArgs e);
|
||||
}
|
||||
+170
-13
@@ -3,37 +3,194 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc.
|
||||
// (C) Ximian, Inc. 2002
|
||||
//
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a parameter to a Command object, and optionally, its mapping to DataSet columns; and is implemented by .NET data providers that access data sources.
|
||||
/// Represents a parameter to a Command object, and optionally,
|
||||
/// its mapping to DataSet columns; and is implemented by .NET
|
||||
/// data providers that access data sources.
|
||||
/// </summary>
|
||||
public class SqlParameter : IDbDataParameter, IDataParameter
|
||||
//public sealed class SqlParameter : MarshalByRefObject,
|
||||
// IDbDataParameter, IDataParameter, ICloneable
|
||||
public sealed class SqlParameter : IDbDataParameter, IDataParameter
|
||||
{
|
||||
[MonoTODO]
|
||||
public SqlParameter () {
|
||||
// FIXME: do this
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter (string parameterName, object value) {
|
||||
// FIXME: do this
|
||||
}
|
||||
|
||||
DbType DbType{get;set;}
|
||||
[MonoTODO]
|
||||
public SqlParameter(string parameterName, SqlDbType dbType) {
|
||||
// FIXME: do this
|
||||
}
|
||||
|
||||
ParameterDirection Direction{get;set;}
|
||||
[MonoTODO]
|
||||
public SqlParameter(string parameterName, SqlDbType dbType,
|
||||
int size) {
|
||||
// FIXME: do this
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter(string parameterName, SqlDbType dbType,
|
||||
int size, string sourceColumn) {
|
||||
// FIXME: do this
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter(string parameterName, SqlDbType dbType,
|
||||
int size, ParameterDirection direction,
|
||||
bool isNullable, byte precision,
|
||||
byte scale, string sourceColumn,
|
||||
DataRowVersion sourceVersion, object value) {
|
||||
// FIXME: do this
|
||||
}
|
||||
|
||||
bool IsNullable{get;}
|
||||
|
||||
string ParameterName{get;set;}
|
||||
[MonoTODO]
|
||||
public DbType DbType {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
string SourceColumn{get;set;}
|
||||
[MonoTODO]
|
||||
public ParameterDirection Direction {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
DataRowVersion SourceVersion {get;set;}
|
||||
[MonoTODO]
|
||||
public bool IsNullable {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
object Value {get;set;}
|
||||
[MonoTODO]
|
||||
public int Offset {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
byte Precision{get; set;}
|
||||
[MonoTODO]
|
||||
public string ParameterName {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
byte Scale{get; set;}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
int Size{get; set;}
|
||||
[MonoTODO]
|
||||
public string SourceColumn {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataRowVersion SourceVersion {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlDbType SqlDbType {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public object Value {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public byte Precision {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public byte Scale {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Size
|
||||
{
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override string ToString() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+212
-8
@@ -3,25 +3,229 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Collects all parameters relevant to a Command object and their mappings to DataSet columns.
|
||||
/// Collects all parameters relevant to a Command object
|
||||
/// and their mappings to DataSet columns.
|
||||
/// </summary>
|
||||
public class SqlParameterCollection : IDataParameterCollection
|
||||
// public sealed class SqlParameterCollection : MarshalByRefObject,
|
||||
// IDataParameterCollection, IList, ICollection, IEnumerable
|
||||
public sealed class SqlParameterCollection : IDataParameterCollection
|
||||
{
|
||||
void RemoveAt(string parameterName);
|
||||
[MonoTODO]
|
||||
public void RemoveAt(string parameterName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int IndexOf(string parameterName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool Contains(string parameterName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
// [MonoTODO]
|
||||
public object this[string parameterName]
|
||||
{
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Add( object value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter Add(SqlParameter value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter Add(string parameterName, object value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter Add(string parameterName, SqlDbType sqlDbType)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter Add(string parameterName,
|
||||
SqlDbType sqlDbType, int size)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter Add(string parameterName,
|
||||
SqlDbType sqlDbType, int size, string sourceColumn)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Clear()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool Contains(object value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/*
|
||||
[MonoTODO]
|
||||
public bool Contains(string value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
int IndexOf(string parameterName);
|
||||
|
||||
bool Contains(string parameterName);
|
||||
*/
|
||||
|
||||
[MonoTODO]
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int IndexOf(object value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
/*
|
||||
[MonoTODO]
|
||||
public int IndexOf(string parameterName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
*/
|
||||
[MonoTODO]
|
||||
public void Insert(int index, object value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Remove(object value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
/*
|
||||
[MonoTODO]
|
||||
public void RemoveAt(string parameterName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
*/
|
||||
/*
|
||||
[MonoTODO]
|
||||
[Serializable]
|
||||
[ClassInterface(ClassInterfaceType.AutoDual)]
|
||||
~SqlParameterCollection();
|
||||
*/
|
||||
|
||||
[MonoTODO]
|
||||
public int Count {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
// [MonoTODO]
|
||||
object IList.this[int index] {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
// [MonoTODO]
|
||||
public SqlParameter this[int index] {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
/*
|
||||
[MonoTODO]
|
||||
public SqlParameter this[string parameterName] {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
bool IList.IsFixedSize {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
bool IList.IsReadOnly {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
bool ICollection.IsSynchronized {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
object ICollection.SyncRoot {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
object this[string parameterName]{get; set;}
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlRowUpdatedEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient {
|
||||
public sealed class SqlRowUpdatedEventArgs : RowUpdatedEventArgs {
|
||||
|
||||
[MonoTODO]
|
||||
public SqlRowUpdatedEventArgs (DataRow row,
|
||||
IDbCommand command, StatementType statementType,
|
||||
DataTableMapping tableMapping) {
|
||||
// FIXME: do the constructor
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public new SqlCommand Command {
|
||||
get {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlRowUpdatedEventArgs () {
|
||||
// FIXME: need destructor to release resources
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlRowUpdatedEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public delegate void SqlRowUpdatedEventHandler(object sender,
|
||||
SqlRowUpdatedEventArgs e);
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlRowUpdatingEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public sealed class SqlRowUpdatingEventArgs : RowUpdatingEventArgs
|
||||
{
|
||||
[MonoTODO]
|
||||
public SqlRowUpdatingEventArgs( DataRow row,
|
||||
IDbCommand command, StatementType statementType,
|
||||
DataTableMapping tableMapping) {
|
||||
// FIXME: do the constructor
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public new SqlCommand Command {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlRowUpdatingEventArgs() {
|
||||
// FIXME: create destructor to release resources
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlRowUpdatingEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public delegate void SqlRowUpdatingEventHandler(object sender,
|
||||
SqlRowUpdatingEventArgs e);
|
||||
}
|
||||
+174
-8
@@ -3,23 +3,189 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc.
|
||||
// (C) Ximian, Inc. 2002
|
||||
//
|
||||
|
||||
// use #define DEBUG_SqlTransaction if you want to spew debug messages
|
||||
// #define DEBUG_SqlTransaction
|
||||
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a transaction to be performed at a SQL database.
|
||||
/// Represents a transaction to be performed on a SQL database.
|
||||
/// </summary>
|
||||
public interface SqlTransaction : IDbTransaction
|
||||
// public sealed class SqlTransaction : MarshalByRefObject,
|
||||
// IDbTransaction, IDisposable
|
||||
public sealed class SqlTransaction : IDbTransaction
|
||||
{
|
||||
void Commit();
|
||||
#region Fields
|
||||
|
||||
void Rollback();
|
||||
private bool doingTransaction = false;
|
||||
private SqlConnection conn = null;
|
||||
private IsolationLevel isolationLevel =
|
||||
IsolationLevel.ReadCommitted;
|
||||
// There are only two IsolationLevel's for PostgreSQL:
|
||||
// ReadCommitted and Serializable,
|
||||
// but ReadCommitted is the default
|
||||
|
||||
SqlConnection Connection{get;}
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
IsolationLevel IsolationLevel{get;}
|
||||
}
|
||||
[MonoTODO]
|
||||
public void Commit ()
|
||||
{
|
||||
if(doingTransaction == false)
|
||||
throw new InvalidOperationException(
|
||||
"Begin transaction was not " +
|
||||
"done earlier " +
|
||||
"thus PostgreSQL can not " +
|
||||
"Commit transaction.");
|
||||
|
||||
SqlCommand cmd = new SqlCommand("COMMIT", conn);
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
doingTransaction = false;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Rollback()
|
||||
{
|
||||
if(doingTransaction == false)
|
||||
throw new InvalidOperationException(
|
||||
"Begin transaction was not " +
|
||||
"done earlier " +
|
||||
"thus PostgreSQL can not " +
|
||||
"Rollback transaction.");
|
||||
|
||||
SqlCommand cmd = new SqlCommand("ROLLBACK", conn);
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
doingTransaction = false;
|
||||
}
|
||||
|
||||
// For PostgreSQL, Rollback(string) will not be implemented
|
||||
// because PostgreSQL does not support Savepoints
|
||||
[Obsolete]
|
||||
public void Rollback(string transactionName) {
|
||||
// throw new NotImplementedException ();
|
||||
Rollback();
|
||||
}
|
||||
|
||||
// For PostgreSQL, Save(string) will not be implemented
|
||||
// because PostgreSQL does not support Savepoints
|
||||
[Obsolete]
|
||||
public void Save (string savePointName) {
|
||||
// throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#endregion // Public Methods
|
||||
|
||||
#region Internal Methods to System.Data.dll Assembly
|
||||
|
||||
internal void Begin()
|
||||
{
|
||||
if(doingTransaction == true)
|
||||
throw new InvalidOperationException(
|
||||
"Transaction has begun " +
|
||||
"and PostgreSQL does not " +
|
||||
"support nested transactions.");
|
||||
|
||||
SqlCommand cmd = new SqlCommand("BEGIN", conn);
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
doingTransaction = true;
|
||||
}
|
||||
|
||||
internal void SetIsolationLevel(IsolationLevel isoLevel)
|
||||
{
|
||||
String sSql = "SET TRANSACTION ISOLATION LEVEL ";
|
||||
|
||||
switch (isoLevel)
|
||||
{
|
||||
case IsolationLevel.ReadCommitted:
|
||||
sSql += "READ COMMITTED";
|
||||
break;
|
||||
|
||||
case IsolationLevel.Serializable:
|
||||
sSql += "SERIALIZABLE";
|
||||
break;
|
||||
|
||||
default:
|
||||
// FIXME: generate exception here
|
||||
// PostgreSQL only supports:
|
||||
// ReadCommitted or Serializable
|
||||
break;
|
||||
}
|
||||
SqlCommand cmd = new SqlCommand(sSql, conn);
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
this.isolationLevel = isoLevel;
|
||||
}
|
||||
|
||||
internal void SetConnection(SqlConnection connection)
|
||||
{
|
||||
this.conn = connection;
|
||||
}
|
||||
|
||||
#endregion // Internal Methods to System.Data.dll Assembly
|
||||
|
||||
#region Properties
|
||||
|
||||
IDbConnection IDbTransaction.Connection {
|
||||
get {
|
||||
return Connection;
|
||||
}
|
||||
}
|
||||
|
||||
public SqlConnection Connection {
|
||||
get {
|
||||
return conn;
|
||||
}
|
||||
}
|
||||
|
||||
public IsolationLevel IsolationLevel {
|
||||
get {
|
||||
return isolationLevel;
|
||||
}
|
||||
}
|
||||
|
||||
internal bool DoingTransaction {
|
||||
get {
|
||||
return doingTransaction;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Destructors
|
||||
|
||||
// Destructors aka Finalize and Dispose
|
||||
|
||||
[MonoTODO]
|
||||
public void Dispose()
|
||||
{
|
||||
// FIXME: need to properly release resources
|
||||
// Dispose(true);
|
||||
}
|
||||
|
||||
// Destructor
|
||||
[MonoTODO]
|
||||
// [Serializable]
|
||||
// [ClassInterface(ClassInterfaceType.AutoDual)]
|
||||
~SqlTransaction() {
|
||||
// FIXME: need to properly release resources
|
||||
// Dispose(false);
|
||||
}
|
||||
|
||||
#endregion // Destructors
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,471 @@
|
||||
//
|
||||
// System.Data.SqlClient.PostgresLibrary.cs
|
||||
//
|
||||
// PInvoke methods to libpq
|
||||
// which is PostgreSQL client library
|
||||
//
|
||||
// May also contain enumerations,
|
||||
// data types, or wrapper methods.
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/* IMPORTANT: DO NOT CHANGE ANY OF THESE ENUMS */
|
||||
|
||||
internal enum ConnStatusType
|
||||
{
|
||||
CONNECTION_OK,
|
||||
CONNECTION_BAD,
|
||||
CONNECTION_STARTED,
|
||||
CONNECTION_MADE,
|
||||
CONNECTION_AWAITING_RESPONSE,
|
||||
CONNECTION_AUTH_OK,
|
||||
CONNECTION_SETENV
|
||||
}
|
||||
|
||||
internal enum PostgresPollingStatusType
|
||||
{
|
||||
PGRES_POLLING_FAILED = 0,
|
||||
PGRES_POLLING_READING,
|
||||
PGRES_POLLING_WRITING,
|
||||
PGRES_POLLING_OK,
|
||||
PGRES_POLLING_ACTIVE
|
||||
}
|
||||
|
||||
internal enum ExecStatusType
|
||||
{
|
||||
PGRES_EMPTY_QUERY = 0,
|
||||
PGRES_COMMAND_OK,
|
||||
PGRES_TUPLES_OK,
|
||||
PGRES_COPY_OUT,
|
||||
PGRES_COPY_IN,
|
||||
PGRES_BAD_RESPONSE,
|
||||
PGRES_NONFATAL_ERROR,
|
||||
PGRES_FATAL_ERROR
|
||||
}
|
||||
|
||||
sealed internal class PostgresLibrary
|
||||
{
|
||||
#region PInvoke Functions
|
||||
|
||||
// pinvoke prototypes to PostgreSQL client library
|
||||
// pq.dll on windows and libpq.so on linux
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQconnectStart (string conninfo);
|
||||
// PGconn *PQconnectStart(const char *conninfo);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern PostgresPollingStatusType PQconnectPoll (IntPtr conn);
|
||||
// PostgresPollingStatusType PQconnectPoll(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQconnectdb (string conninfo);
|
||||
// PGconn *PQconnectdb(const char *conninfo);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQsetdbLogin (string pghost,
|
||||
string pgport, string pgoptions,
|
||||
string pgtty, string dbName,
|
||||
string login, string pwd);
|
||||
// PGconn *PQsetdbLogin(const char *pghost,
|
||||
// const char *pgport, const char *pgoptions,
|
||||
// const char *pgtty, const char *dbName,
|
||||
// const char *login, const char *pwd);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQfinish (IntPtr conn);
|
||||
// void PQfinish(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQconndefaults ();
|
||||
// PQconninfoOption *PQconndefaults(void);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQconninfoFree (IntPtr connOptions);
|
||||
// void PQconninfoFree(PQconninfoOption *connOptions);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQresetStart (IntPtr conn);
|
||||
// int PQresetStart(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQresetPoll (IntPtr conn);
|
||||
// PostgresPollingStatusType PQresetPoll(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQreset (IntPtr conn);
|
||||
// void PQreset(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQrequestCancel (IntPtr conn);
|
||||
// int PQrequestCancel(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQdb (IntPtr conn);
|
||||
// char *PQdb(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQuser (IntPtr conn);
|
||||
// char *PQuser(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQpass (IntPtr conn);
|
||||
// char *PQpass(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQhost (IntPtr conn);
|
||||
// char *PQhost(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQport (IntPtr conn);
|
||||
// char *PQport(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQtty (IntPtr conn);
|
||||
// char *PQtty(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQoptions (IntPtr conn);
|
||||
// char *PQoptions(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern ConnStatusType PQstatus (IntPtr conn);
|
||||
// ConnStatusType PQstatus(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQerrorMessage (IntPtr conn);
|
||||
// char *PQerrorMessage(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQsocket (IntPtr conn);
|
||||
// int PQsocket(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQbackendPID (IntPtr conn);
|
||||
// int PQbackendPID(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQclientEncoding (IntPtr conn);
|
||||
// int PQclientEncoding(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQsetClientEncoding (IntPtr conn,
|
||||
string encoding);
|
||||
// int PQsetClientEncoding(PGconn *conn,
|
||||
// const char *encoding);
|
||||
|
||||
//FIXME: when loading, causes runtime exception
|
||||
//[DllImport("pq")]
|
||||
//public static extern IntPtr PQgetssl (IntPtr conn);
|
||||
// SSL *PQgetssl(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQtrace (IntPtr conn,
|
||||
IntPtr debug_port);
|
||||
// void PQtrace(PGconn *conn,
|
||||
// FILE *debug_port);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQuntrace (IntPtr conn);
|
||||
// void PQuntrace(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQsetNoticeProcessor (IntPtr conn,
|
||||
IntPtr proc, IntPtr arg);
|
||||
// PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
|
||||
// PQnoticeProcessor proc, void *arg);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQescapeString (string to,
|
||||
string from, int length);
|
||||
// size_t PQescapeString(char *to,
|
||||
// const char *from, size_t length);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQescapeBytea (string bintext,
|
||||
int binlen, IntPtr bytealen);
|
||||
// unsigned char *PQescapeBytea(unsigned char *bintext,
|
||||
// size_t binlen, size_t *bytealen);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQexec (IntPtr conn,
|
||||
string query);
|
||||
// PGresult *PQexec(PGconn *conn,
|
||||
// const char *query);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQnotifies (IntPtr conn);
|
||||
// PGnotify *PQnotifies(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQfreeNotify (IntPtr notify);
|
||||
// void PQfreeNotify(PGnotify *notify);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQsendQuery (IntPtr conn,
|
||||
string query);
|
||||
// int PQsendQuery(PGconn *conn,
|
||||
// const char *query);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQgetResult (IntPtr conn);
|
||||
// PGresult *PQgetResult(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQisBusy (IntPtr conn);
|
||||
// int PQisBusy(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQconsumeInput (IntPtr conn);
|
||||
// int PQconsumeInput(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQgetline (IntPtr conn,
|
||||
string str, int length);
|
||||
// int PQgetline(PGconn *conn,
|
||||
// char *string, int length);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQputline (IntPtr conn,
|
||||
string str);
|
||||
// int PQputline(PGconn *conn,
|
||||
// const char *string);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQgetlineAsync (IntPtr conn,
|
||||
string buffer, int bufsize);
|
||||
// int PQgetlineAsync(PGconn *conn, char *buffer,
|
||||
// int bufsize);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQputnbytes (IntPtr conn,
|
||||
string buffer, int nbytes);
|
||||
// int PQputnbytes(PGconn *conn,
|
||||
//const char *buffer, int nbytes);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQendcopy (IntPtr conn);
|
||||
// int PQendcopy(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQsetnonblocking (IntPtr conn,
|
||||
int arg);
|
||||
// int PQsetnonblocking(PGconn *conn, int arg);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQisnonblocking (IntPtr conn);
|
||||
// int PQisnonblocking(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQflush (IntPtr conn);
|
||||
// int PQflush(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQfn (IntPtr conn, int fnid,
|
||||
IntPtr result_buf, IntPtr result_len,
|
||||
int result_is_int, IntPtr args,
|
||||
int nargs);
|
||||
// PGresult *PQfn(PGconn *conn, int fnid,
|
||||
// int *result_buf, int *result_len,
|
||||
// int result_is_int, const PQArgBlock *args,
|
||||
// int nargs);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern ExecStatusType PQresultStatus (IntPtr res);
|
||||
// ExecStatusType PQresultStatus(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQresStatus (ExecStatusType status);
|
||||
// char *PQresStatus(ExecStatusType status);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQresultErrorMessage (IntPtr res);
|
||||
// char *PQresultErrorMessage(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQntuples (IntPtr res);
|
||||
// int PQntuples(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQnfields (IntPtr res);
|
||||
// int PQnfields(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQbinaryTuples (IntPtr res);
|
||||
// int PQbinaryTuples(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQfname (IntPtr res,
|
||||
int field_num);
|
||||
// char *PQfname(const PGresult *res,
|
||||
// int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQfnumber (IntPtr res,
|
||||
string field_name);
|
||||
// int PQfnumber(const PGresult *res,
|
||||
// const char *field_name);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQftype (IntPtr res,
|
||||
int field_num);
|
||||
// Oid PQftype(const PGresult *res,
|
||||
// int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQfsize (IntPtr res,
|
||||
int field_num);
|
||||
// int PQfsize(const PGresult *res,
|
||||
// int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQfmod (IntPtr res, int field_num);
|
||||
// int PQfmod(const PGresult *res, int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQcmdStatus (IntPtr res);
|
||||
// char *PQcmdStatus(PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQoidStatus (IntPtr res);
|
||||
// char *PQoidStatus(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQoidValue (IntPtr res);
|
||||
// Oid PQoidValue(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQcmdTuples (IntPtr res);
|
||||
// char *PQcmdTuples(PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQgetvalue (IntPtr res,
|
||||
int tup_num, int field_num);
|
||||
// char *PQgetvalue(const PGresult *res,
|
||||
// int tup_num, int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQgetlength (IntPtr res,
|
||||
int tup_num, int field_num);
|
||||
// int PQgetlength(const PGresult *res,
|
||||
// int tup_num, int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQgetisnull (IntPtr res,
|
||||
int tup_num, int field_num);
|
||||
// int PQgetisnull(const PGresult *res,
|
||||
// int tup_num, int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQclear (IntPtr res);
|
||||
// void PQclear(PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQmakeEmptyPGresult (IntPtr conn,
|
||||
IntPtr status);
|
||||
// PGresult *PQmakeEmptyPGresult(PGconn *conn,
|
||||
// ExecStatusType status);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQprint (IntPtr fout,
|
||||
IntPtr res, IntPtr ps);
|
||||
// void PQprint(FILE *fout,
|
||||
// const PGresult *res, const PQprintOpt *ps);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQdisplayTuples (IntPtr res,
|
||||
IntPtr fp, int fillAlign, string fieldSep,
|
||||
int printHeader, int quiet);
|
||||
// void PQdisplayTuples(const PGresult *res,
|
||||
// FILE *fp, int fillAlign, const char *fieldSep,
|
||||
// int printHeader, int quiet);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQprintTuples (IntPtr res,
|
||||
IntPtr fout, int printAttName, int terseOutput,
|
||||
int width);
|
||||
// void PQprintTuples(const PGresult *res,
|
||||
// FILE *fout, int printAttName, int terseOutput,
|
||||
// int width);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_open (IntPtr conn,
|
||||
int lobjId, int mode);
|
||||
// int lo_open(PGconn *conn,
|
||||
// Oid lobjId, int mode);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_close (IntPtr conn, int fd);
|
||||
// int lo_close(PGconn *conn, int fd);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_read (IntPtr conn,
|
||||
int fd, string buf, int len);
|
||||
// int lo_read(PGconn *conn,
|
||||
// int fd, char *buf, size_t len);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_write (IntPtr conn,
|
||||
int fd, string buf, int len);
|
||||
// int lo_write(PGconn *conn,
|
||||
// int fd, char *buf, size_t len);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_lseek (IntPtr conn,
|
||||
int fd, int offset, int whence);
|
||||
// int lo_lseek(PGconn *conn,
|
||||
// int fd, int offset, int whence);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_creat (IntPtr conn,
|
||||
int mode);
|
||||
// Oid lo_creat(PGconn *conn,
|
||||
// int mode);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_tell (IntPtr conn, int fd);
|
||||
// int lo_tell(PGconn *conn, int fd);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_unlink (IntPtr conn,
|
||||
int lobjId);
|
||||
// int lo_unlink(PGconn *conn,
|
||||
// Oid lobjId);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_import (IntPtr conn,
|
||||
string filename);
|
||||
// Oid lo_import(PGconn *conn,
|
||||
// const char *filename);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_export (IntPtr conn,
|
||||
int lobjId, string filename);
|
||||
// int lo_export(PGconn *conn,
|
||||
// Oid lobjId, const char *filename);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQmblen (string s,
|
||||
int encoding);
|
||||
// int PQmblen(const unsigned char *s,
|
||||
// int encoding);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQenv2encoding ();
|
||||
// int PQenv2encoding(void);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlClientPermission.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient {
|
||||
|
||||
public sealed class SqlClientPermission : DBDataPermission {
|
||||
|
||||
[MonoTODO]
|
||||
public SqlClientPermission() {
|
||||
// FIXME: do constructor
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlClientPermission(PermissionState state) {
|
||||
// FIXME: do constructor
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlClientPermission(PermissionState state,
|
||||
bool allowBlankPassword) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IPermission Copy() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override void FromXml(SecurityElement
|
||||
securityElement) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IPermission Intersect(IPermission target) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override bool IsSubsetOf(IPermission target) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override string ToString() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override SecurityElement ToXml() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IPermission Union(IPermission target) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlClientPermission() {
|
||||
// FIXME: destructor to release resources
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlClientPermissionAttribute.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient {
|
||||
|
||||
[AttributeUsage(AttributeTargets.Assembly |
|
||||
AttributeTargets.Class |
|
||||
AttributeTargets.Struct |
|
||||
AttributeTargets.Constructor |
|
||||
AttributeTargets.Method)]
|
||||
[Serializable]
|
||||
public sealed class SqlClientPermissionAttribute :
|
||||
DBDataPermissionAttribute {
|
||||
|
||||
[MonoTODO]
|
||||
[AttributeUsage(AttributeTargets.Assembly |
|
||||
AttributeTargets.Class |
|
||||
AttributeTargets.Struct |
|
||||
AttributeTargets.Constructor |
|
||||
AttributeTargets.Method)]
|
||||
[Serializable]
|
||||
public SqlClientPermissionAttribute(SecurityAction action) {
|
||||
// FIXME: do constructor
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class
|
||||
| AttributeTargets.Struct | AttributeTargets.Constructor |
|
||||
AttributeTargets.Method)]
|
||||
[Serializable]
|
||||
public override IPermission CreatePermission() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlClientPermissionAttribute() {
|
||||
// FIXME: destructor to release resources
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,45 +2,379 @@
|
||||
// System.Data.SqlClient.SqlCommand.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya (rd[email protected])
|
||||
// Rodrigo Moya (rod[email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
// use #define DEBUG_SqlCommand if you want to spew debug messages
|
||||
// #define DEBUG_SqlCommand
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Xml;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SQL statement that is executed while connected to a SQL database.
|
||||
/// Represents a SQL statement that is executed
|
||||
/// while connected to a SQL database.
|
||||
/// </summary>
|
||||
public class SqlCommand : IDbCommand
|
||||
// public sealed class SqlCommand : Component, IDbCommand, ICloneable
|
||||
public sealed class SqlCommand : IDbCommand
|
||||
{
|
||||
void Cancel();
|
||||
// FIXME: Console.WriteLine() is used for debugging throughout
|
||||
|
||||
#region Fields
|
||||
|
||||
string sql = "";
|
||||
int timeout = 30;
|
||||
// default is 30 seconds
|
||||
// for command execution
|
||||
|
||||
SqlConnection conn = null;
|
||||
SqlTransaction trans = null;
|
||||
CommandType cmdType = CommandType.Text;
|
||||
bool designTime = false;
|
||||
SqlParameterCollection parmCollection = new
|
||||
SqlParameterCollection();
|
||||
|
||||
#endregion // Fields
|
||||
|
||||
#region Constructors
|
||||
|
||||
public SqlCommand()
|
||||
{
|
||||
sql = "";
|
||||
}
|
||||
|
||||
public SqlCommand (string cmdText)
|
||||
{
|
||||
sql = cmdText;
|
||||
}
|
||||
|
||||
public SqlCommand (string cmdText, SqlConnection connection)
|
||||
{
|
||||
sql = cmdText;
|
||||
conn = connection;
|
||||
}
|
||||
|
||||
public SqlCommand (string cmdText, SqlConnection connection,
|
||||
SqlTransaction transaction)
|
||||
{
|
||||
sql = cmdText;
|
||||
conn = connection;
|
||||
trans = transaction;
|
||||
}
|
||||
|
||||
#endregion // Constructors
|
||||
|
||||
#region Methods
|
||||
|
||||
[MonoTODO]
|
||||
public void Cancel ()
|
||||
{
|
||||
// FIXME: use non-blocking Exec for this
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
// FIXME: is this the correct way to return a stronger type?
|
||||
[MonoTODO]
|
||||
IDbDataParameter IDbCommand.CreateParameter ()
|
||||
{
|
||||
return CreateParameter ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter CreateParameter ()
|
||||
{
|
||||
return new SqlParameter ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int ExecuteNonQuery ()
|
||||
{
|
||||
IntPtr pgResult; // PGresult
|
||||
int rowsAffected = -1;
|
||||
ExecStatusType execStatus;
|
||||
String rowsAffectedString;
|
||||
|
||||
if(conn.State != ConnectionState.Open)
|
||||
throw new InvalidOperationException(
|
||||
"ConnnectionState is not Open");
|
||||
|
||||
// FIXME: PQexec blocks
|
||||
// while PQsendQuery is non-blocking
|
||||
// which is better to use?
|
||||
// int PQsendQuery(PGconn *conn,
|
||||
// const char *query);
|
||||
|
||||
// execute SQL command
|
||||
// uses internal property to get the PGConn IntPtr
|
||||
pgResult = PostgresLibrary.
|
||||
PQexec (conn.PostgresConnection, sql);
|
||||
|
||||
execStatus = PostgresLibrary.
|
||||
PQresultStatus (pgResult);
|
||||
|
||||
if(execStatus == ExecStatusType.PGRES_COMMAND_OK)
|
||||
{
|
||||
rowsAffectedString = PostgresLibrary.
|
||||
PQcmdTuples (pgResult);
|
||||
#if DEBUG_SqlCommand
|
||||
Console.WriteLine("rowsAffectedString: " +
|
||||
rowsAffectedString);
|
||||
#endif // DEBUG_SqlCommand
|
||||
if(rowsAffectedString != null)
|
||||
if(rowsAffectedString.Equals("") == false)
|
||||
rowsAffected = int.Parse(rowsAffectedString);
|
||||
}
|
||||
else
|
||||
{
|
||||
String errorMessage;
|
||||
|
||||
errorMessage = PostgresLibrary.
|
||||
PQresStatus(execStatus);
|
||||
|
||||
errorMessage += " " + PostgresLibrary.
|
||||
PQresultErrorMessage(pgResult);
|
||||
|
||||
throw new SqlException(0, 0,
|
||||
errorMessage, 0, "",
|
||||
conn.DataSource, "SqlCommand", 0);
|
||||
}
|
||||
#if DEBUG_SqlCommand
|
||||
String cmdStatus;
|
||||
cmdStatus = PostgresLibrary.
|
||||
PQcmdStatus(pgResult);
|
||||
|
||||
Console.WriteLine("*** Command Status: " +
|
||||
cmdStatus);
|
||||
#endif // DEBUG_SqlCommand
|
||||
PostgresLibrary.PQclear (pgResult);
|
||||
|
||||
// FIXME: get number of rows
|
||||
// affected for INSERT, UPDATE, or DELETE
|
||||
// any other, return -1 (such as, CREATE TABLE)
|
||||
return rowsAffected;
|
||||
}
|
||||
|
||||
SqlParameter CreateParameter();
|
||||
// FIXME: temporarily commmented out, so I could get a simple working
|
||||
// SqlConnection and SqlCommand. I had to temporarily
|
||||
// comment it out the ExecuteReader in IDbCommand as well.
|
||||
/*
|
||||
[MonoTODO]
|
||||
IDataReader IDbCommand.ExecuteReader ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
SqlDataReader ExecuteReader ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
IDataReader IDbCommand.ExecuteReader (
|
||||
CommandBehavior behavior)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlDataReader ExecuteReader (CommandBehavior behavior)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
*/
|
||||
|
||||
[MonoTODO]
|
||||
public object ExecuteScalar ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public XmlReader ExecuteXmlReader ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Prepare ()
|
||||
{
|
||||
// FIXME: parameters have to be implemented for this
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommand Clone ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#endregion // Methods
|
||||
|
||||
#region Properties
|
||||
|
||||
public string CommandText {
|
||||
get {
|
||||
return sql;
|
||||
}
|
||||
|
||||
set {
|
||||
sql = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int CommandTimeout {
|
||||
get {
|
||||
return timeout;
|
||||
}
|
||||
|
||||
set {
|
||||
// FIXME: if value < 0, throw
|
||||
// ArgumentException
|
||||
// if (value < 0)
|
||||
// throw ArgumentException;
|
||||
timeout = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CommandType CommandType {
|
||||
get {
|
||||
return cmdType;
|
||||
}
|
||||
|
||||
set {
|
||||
cmdType = value;
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: for property Connection, is this the correct
|
||||
// way to handle a return of a stronger type?
|
||||
IDbConnection IDbCommand.Connection {
|
||||
get {
|
||||
return Connection;
|
||||
}
|
||||
|
||||
set {
|
||||
// FIXME: throw an InvalidOperationException
|
||||
// if the change was during a
|
||||
// transaction in progress
|
||||
|
||||
// csc
|
||||
Connection = (SqlConnection) value;
|
||||
// mcs
|
||||
// Connection = value;
|
||||
|
||||
// FIXME: set Transaction property to null
|
||||
}
|
||||
}
|
||||
|
||||
int ExecuteNonQuery();
|
||||
public SqlConnection Connection {
|
||||
get {
|
||||
// conn defaults to null
|
||||
return conn;
|
||||
}
|
||||
|
||||
SqlDataReader ExecuteReader();
|
||||
set {
|
||||
// FIXME: throw an InvalidOperationException
|
||||
// if the change was during
|
||||
// a transaction in progress
|
||||
conn = value;
|
||||
// FIXME: set Transaction property to null
|
||||
}
|
||||
}
|
||||
|
||||
SqlDataReader ExecuteReader(CommandBehavior behavior);
|
||||
public bool DesignTimeVisible {
|
||||
get {
|
||||
return designTime;
|
||||
}
|
||||
|
||||
set{
|
||||
designTime = value;
|
||||
}
|
||||
}
|
||||
|
||||
object ExecuteScalar();
|
||||
// FIXME; for property Parameters, is this the correct
|
||||
// way to handle a stronger return type?
|
||||
IDataParameterCollection IDbCommand.Parameters {
|
||||
get {
|
||||
return Parameters;
|
||||
}
|
||||
}
|
||||
|
||||
void Prepare();
|
||||
SqlParameterCollection Parameters {
|
||||
get {
|
||||
return parmCollection;
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: for property Transaction, is this the correct
|
||||
// way to handle a return of a stronger type?
|
||||
IDbTransaction IDbCommand.Transaction {
|
||||
get {
|
||||
return Transaction;
|
||||
}
|
||||
|
||||
string CommandText{get; set;}
|
||||
set {
|
||||
// FIXME: error handling - do not allow
|
||||
// setting of transaction if transaction
|
||||
// has already begun
|
||||
|
||||
int CommandTimeout{get; set;}
|
||||
// csc
|
||||
Transaction = (SqlTransaction) value;
|
||||
// mcs
|
||||
// Transaction = value;
|
||||
}
|
||||
}
|
||||
|
||||
CommandType CommandType{get; set;}
|
||||
public SqlTransaction Transaction {
|
||||
get {
|
||||
return trans;
|
||||
}
|
||||
|
||||
SqlConnection Connection{get; set;}
|
||||
set {
|
||||
// FIXME: error handling
|
||||
trans = value;
|
||||
}
|
||||
}
|
||||
|
||||
SqlParameterCollection Parameters{get;}
|
||||
[MonoTODO]
|
||||
public UpdateRowSource UpdatedRowSource {
|
||||
// FIXME: do this once DbDataAdaptor
|
||||
// and DataRow are done
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
IDbTransaction Transaction{get; set;}
|
||||
#endregion // Properties
|
||||
|
||||
UpdateRowSource UpdatedRowSource{get; set;}
|
||||
#region Destructors
|
||||
|
||||
[MonoTODO]
|
||||
public void Dispose() {
|
||||
// FIXME: need proper way to release resources
|
||||
// Dispose(true);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlCommand()
|
||||
{
|
||||
// FIXME: need proper way to release resources
|
||||
// Dispose(false);
|
||||
}
|
||||
|
||||
#endregion //Destructors
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlCommandBuilder.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Data.SqlClient {
|
||||
|
||||
/// <summary>
|
||||
/// Builder of one command
|
||||
/// that will be used in manipulating a table for
|
||||
/// a DataSet that is assoicated with a database.
|
||||
/// </summary>
|
||||
public sealed class SqlCommandBuilder : Component {
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommandBuilder() {
|
||||
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommandBuilder(SqlDataAdapter adapter) {
|
||||
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlDataAdapter DataAdapter {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string QuotePrefix {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string QuoteSuffix {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static void DeriveParameters(SqlCommand command) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommand GetDeleteCommand() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommand GetInsertCommand() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommand GetUpdateCommand() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void RefreshSchema() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected override void Dispose(bool disposing) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlCommandBuilder() {
|
||||
// FIXME: create destructor - release resources
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,37 +3,526 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
// use #define DEBUG_SqlConnection if you want to spew debug messages
|
||||
// #define DEBUG_SqlConnection
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
// using PGconn = IntPtr;
|
||||
// PGconn is native C library type in libpq for Postgres Connection
|
||||
|
||||
// using PGressult = IntPtr;
|
||||
// PGresult is native C library type in libpq for Postgres Resultset
|
||||
|
||||
/// <summary>
|
||||
/// Represents an open connection to a SQL data source
|
||||
/// </summary>
|
||||
public class SqlConnection : IDBConnection
|
||||
//public sealed class SqlConnection : Component, IDbConnection,
|
||||
// ICloneable
|
||||
public sealed class SqlConnection : IDbConnection
|
||||
{
|
||||
SqlTransaction BeginTransaction();
|
||||
// FIXME: Need to implement class Component,
|
||||
// and interfaces: ICloneable and IDisposable
|
||||
|
||||
SqlTransaction BeginTransaction(IsolationLevel il);
|
||||
#region Fields
|
||||
|
||||
void ChangeDatabase(string databaseName);
|
||||
private IntPtr pgConn = IntPtr.Zero;
|
||||
// PGConn (Postgres Connection)
|
||||
private string connectionString = "";
|
||||
// OLE DB Connection String
|
||||
private string pgConnectionString = "";
|
||||
// PostgreSQL Connection String
|
||||
private SqlTransaction trans = null;
|
||||
private int connectionTimeout = 15;
|
||||
// default for 15 seconds
|
||||
|
||||
// connection parameters in connection string
|
||||
private string host = "";
|
||||
// Name of host to connect to
|
||||
private string hostaddr = "";
|
||||
// IP address of host to connect to
|
||||
// should be in "n.n.n.n" format
|
||||
private string port = "";
|
||||
// Port number to connect to at the server host
|
||||
private string dbname = ""; // The database name.
|
||||
private string user = ""; // User name to connect as.
|
||||
private string password = "";
|
||||
// Password to be used if the server
|
||||
// demands password authentication.
|
||||
private string options = "";
|
||||
// Trace/debug options to be sent to the server.
|
||||
private string tty = "";
|
||||
// A file or tty for optional
|
||||
// debug output from the backend.
|
||||
private string requiressl = "";
|
||||
// Set to 1 to require
|
||||
// SSL connection to the backend.
|
||||
// Libpq will then refuse to connect
|
||||
// if the server does not
|
||||
// support SSL. Set to 0 (default) to
|
||||
// negotiate with server.
|
||||
|
||||
void Close();
|
||||
ConnectionState conState = ConnectionState.Closed;
|
||||
|
||||
SqlCommand CreateCommand();
|
||||
#endregion // Fields
|
||||
|
||||
void Open();
|
||||
#region Constructors
|
||||
|
||||
/*
|
||||
[MonoTODO]
|
||||
public SqlConnection ()
|
||||
{
|
||||
this.ConnectionString = null;
|
||||
this.ConnectionTimeout = 0;
|
||||
this.Database = null;
|
||||
this.State = 0;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlConnection (string cs) : SqlConnection ()
|
||||
{
|
||||
this.ConnectionString = cs;
|
||||
}
|
||||
|
||||
*/
|
||||
// A lot of the defaults were initialized in the Fields
|
||||
[MonoTODO]
|
||||
public SqlConnection ()
|
||||
{
|
||||
|
||||
string ConnectionString{get; set;}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlConnection (String connectionString)
|
||||
{
|
||||
SetConnectionString (connectionString);
|
||||
}
|
||||
|
||||
int ConnectionTimeout{get;}
|
||||
#endregion // Constructors
|
||||
|
||||
string Database{get;}
|
||||
#region Destructors
|
||||
|
||||
ConnectionState State{get;}
|
||||
[MonoTODO]
|
||||
public void Dispose () {
|
||||
// FIXME: release resources properly
|
||||
Close ();
|
||||
// Dispose (true);
|
||||
}
|
||||
|
||||
// aka Finalize
|
||||
// [ClassInterface(ClassInterfaceType.AutoDual)]
|
||||
[MonoTODO]
|
||||
~SqlConnection()
|
||||
{
|
||||
// FIXME: this class need
|
||||
// a destructor to release resources
|
||||
// Also, take a look at Dispose
|
||||
// Dispose (false);
|
||||
}
|
||||
|
||||
#endregion // Destructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
IDbTransaction IDbConnection.BeginTransaction ()
|
||||
{
|
||||
return BeginTransaction ();
|
||||
}
|
||||
|
||||
public SqlTransaction BeginTransaction ()
|
||||
{
|
||||
return TransactionBegin (); // call private method
|
||||
}
|
||||
|
||||
IDbTransaction IDbConnection.BeginTransaction (IsolationLevel
|
||||
il)
|
||||
{
|
||||
return BeginTransaction (il);
|
||||
}
|
||||
|
||||
public SqlTransaction BeginTransaction (IsolationLevel il)
|
||||
{
|
||||
return TransactionBegin (il); // call private method
|
||||
}
|
||||
|
||||
// PostgreSQL does not support named transactions/savepoint
|
||||
// nor nested transactions
|
||||
[Obsolete]
|
||||
public SqlTransaction BeginTransaction(string transactionName) {
|
||||
return TransactionBegin (); // call private method
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public SqlTransaction BeginTransaction(IsolationLevel iso,
|
||||
string transactionName) {
|
||||
return TransactionBegin (iso); // call private method
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void ChangeDatabase (string databaseName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Close ()
|
||||
{
|
||||
CloseDataSource ();
|
||||
}
|
||||
|
||||
IDbCommand IDbConnection.CreateCommand ()
|
||||
{
|
||||
return CreateCommand ();
|
||||
}
|
||||
|
||||
public SqlCommand CreateCommand ()
|
||||
{
|
||||
SqlCommand sqlcmd = new SqlCommand ("", this);
|
||||
|
||||
return sqlcmd;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Open ()
|
||||
{
|
||||
OpenDataSource ();
|
||||
}
|
||||
|
||||
#endregion // Public Methods
|
||||
|
||||
#region Internal Methods
|
||||
|
||||
// this is for System.Data.SqlClient classes
|
||||
// to get the Postgres connection
|
||||
internal IntPtr PostgresConnection {
|
||||
get {
|
||||
return pgConn;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // Internal Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
// FIXME: protected override void Dispose overrides Component
|
||||
// however, including Component causes other problems
|
||||
/*
|
||||
[MonoTODO]
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void OpenDataSource ()
|
||||
{
|
||||
if(dbname.Equals(""))
|
||||
throw new InvalidOperationException(
|
||||
"dbname missing");
|
||||
else if(conState == ConnectionState.Open)
|
||||
throw new InvalidOperationException(
|
||||
"ConnnectionState is already Open");
|
||||
|
||||
ConnStatusType connStatus;
|
||||
|
||||
// FIXME: check to make sure we have
|
||||
// everything to connect,
|
||||
// otherwise, throw an exception
|
||||
|
||||
pgConn = PostgresLibrary.PQconnectdb
|
||||
(pgConnectionString);
|
||||
|
||||
// FIXME: should we use PQconnectStart/PQconnectPoll
|
||||
// instead of PQconnectdb?
|
||||
// PQconnectdb blocks
|
||||
// PQconnectStart/PQconnectPoll is non-blocking
|
||||
|
||||
connStatus = PostgresLibrary.PQstatus (pgConn);
|
||||
if(connStatus == ConnStatusType.CONNECTION_OK)
|
||||
{
|
||||
// Successfully Connected
|
||||
conState = ConnectionState.Open;
|
||||
}
|
||||
else
|
||||
{
|
||||
String errorMessage = PostgresLibrary.
|
||||
PQerrorMessage (pgConn);
|
||||
errorMessage += ": Could not connect to database.";
|
||||
|
||||
throw new SqlException(0, 0,
|
||||
errorMessage, 0, "",
|
||||
host, "SqlConnection", 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void CloseDataSource ()
|
||||
{
|
||||
// FIXME: just a quick hack
|
||||
conState = ConnectionState.Closed;
|
||||
PostgresLibrary.PQfinish (pgConn);
|
||||
}
|
||||
|
||||
private void SetConnectionString (string connectionString)
|
||||
{
|
||||
// FIXME: perform error checking on string
|
||||
// while translating string from
|
||||
// OLE DB format to PostgreSQL
|
||||
// connection string format
|
||||
//
|
||||
// OLE DB: "host=localhost;dbname=test;user=joe;password=smoe"
|
||||
// PostgreSQL: "host=localhost dbname=test user=joe password=smoe"
|
||||
//
|
||||
// For OLE DB, you would have the additional
|
||||
// "provider=postgresql"
|
||||
// OleDbConnection you would be using libgda, maybe
|
||||
// it would be
|
||||
// "provider=OAFIID:GNOME_Database_Postgres_Provider"
|
||||
// instead.
|
||||
//
|
||||
// Also, parse the connection string into properties
|
||||
|
||||
// FIXME: if connection is open, you can
|
||||
// not set the connection
|
||||
// string, throw an exception
|
||||
|
||||
this.connectionString = connectionString;
|
||||
pgConnectionString = ConvertStringToPostgres (
|
||||
connectionString);
|
||||
|
||||
#if DEBUG_SqlConnection
|
||||
Console.WriteLine(
|
||||
"OLE-DB Connection String [in]: " +
|
||||
this.ConnectionString);
|
||||
Console.WriteLine(
|
||||
"Postgres Connection String [out]: " +
|
||||
pgConnectionString);
|
||||
#endif // DEBUG_SqlConnection
|
||||
}
|
||||
|
||||
private String ConvertStringToPostgres (String
|
||||
oleDbConnectionString)
|
||||
{
|
||||
StringBuilder postgresConnection =
|
||||
new StringBuilder();
|
||||
string result;
|
||||
string[] connectionParameters;
|
||||
|
||||
char[] semicolon = new Char[1];
|
||||
semicolon[0] = ';';
|
||||
|
||||
// FIXME: what is the max number of value pairs
|
||||
// can there be for the OLE DB
|
||||
// connnection string? what about libgda max?
|
||||
// what about postgres max?
|
||||
|
||||
// FIXME: currently assuming value pairs are like:
|
||||
// "key1=value1;key2=value2;key3=value3"
|
||||
// Need to deal with values that have
|
||||
// single or double quotes. And error
|
||||
// handling of that too.
|
||||
// "key1=value1;key2='value2';key=\"value3\""
|
||||
|
||||
// FIXME: put the connection parameters
|
||||
// from the connection
|
||||
// string into a
|
||||
// Hashtable (System.Collections)
|
||||
// instead of using private variables
|
||||
// to store them
|
||||
connectionParameters = oleDbConnectionString.
|
||||
Split (semicolon);
|
||||
foreach (string sParameter in connectionParameters) {
|
||||
if(sParameter.Length > 0) {
|
||||
BreakConnectionParameter (sParameter);
|
||||
postgresConnection.
|
||||
Append (sParameter +
|
||||
" ");
|
||||
}
|
||||
}
|
||||
result = postgresConnection.ToString ();
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool BreakConnectionParameter (String sParameter)
|
||||
{
|
||||
bool addParm = true;
|
||||
int index;
|
||||
|
||||
index = sParameter.IndexOf ("=");
|
||||
if (index > 0) {
|
||||
string parmKey, parmValue;
|
||||
|
||||
// separate string "key=value" to
|
||||
// string "key" and "value"
|
||||
parmKey = sParameter.Substring (0, index);
|
||||
parmValue = sParameter.Substring (index + 1,
|
||||
sParameter.Length - index - 1);
|
||||
|
||||
switch(parmKey.ToLower()) {
|
||||
case "hostaddr":
|
||||
hostaddr = parmValue;
|
||||
break;
|
||||
|
||||
case "port":
|
||||
port = parmValue;
|
||||
break;
|
||||
|
||||
case "host":
|
||||
// set DataSource property
|
||||
host = parmValue;
|
||||
break;
|
||||
|
||||
case "dbname":
|
||||
// set Database property
|
||||
dbname = parmValue;
|
||||
break;
|
||||
|
||||
case "user":
|
||||
user = parmValue;
|
||||
break;
|
||||
|
||||
case "password":
|
||||
password = parmValue;
|
||||
// addParm = false;
|
||||
break;
|
||||
|
||||
case "options":
|
||||
options = parmValue;
|
||||
break;
|
||||
|
||||
case "tty":
|
||||
tty = parmValue;
|
||||
break;
|
||||
|
||||
case "requiressl":
|
||||
requiressl = parmValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return addParm;
|
||||
}
|
||||
|
||||
private SqlTransaction TransactionBegin ()
|
||||
{
|
||||
// FIXME: need to keep track of
|
||||
// transaction in-progress
|
||||
trans = new SqlTransaction ();
|
||||
// using internal methods of SqlTransaction
|
||||
trans.SetConnection (this);
|
||||
trans.Begin();
|
||||
|
||||
return trans;
|
||||
}
|
||||
|
||||
private SqlTransaction TransactionBegin (IsolationLevel il)
|
||||
{
|
||||
// FIXME: need to keep track of
|
||||
// transaction in-progress
|
||||
TransactionBegin();
|
||||
trans.SetIsolationLevel (il);
|
||||
|
||||
return trans;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
[MonoTODO]
|
||||
public ConnectionState State {
|
||||
get {
|
||||
return conState;
|
||||
}
|
||||
}
|
||||
|
||||
public string ConnectionString {
|
||||
get {
|
||||
return connectionString;
|
||||
}
|
||||
set {
|
||||
SetConnectionString (value);
|
||||
}
|
||||
}
|
||||
|
||||
public int ConnectionTimeout {
|
||||
get {
|
||||
return connectionTimeout;
|
||||
}
|
||||
}
|
||||
|
||||
public string Database {
|
||||
get {
|
||||
return dbname;
|
||||
}
|
||||
}
|
||||
|
||||
public string DataSource {
|
||||
get {
|
||||
return host;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: this is here because of Component?
|
||||
[MonoTODO]
|
||||
protected bool DesignMode {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
*/
|
||||
public int PacketSize {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public string ServerVersion {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal SqlTransaction Transaction {
|
||||
get {
|
||||
return trans;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events and Delegates
|
||||
|
||||
// FIXME: the two events belong here
|
||||
// however, i do not know about the delegates
|
||||
// also, they are stubs for now
|
||||
/*
|
||||
public delegate void
|
||||
SqlInfoMessageEventHandler (object sender,
|
||||
SqlInfoMessageEventArgs e);
|
||||
|
||||
public event
|
||||
SqlInfoMessageEventHandler InfoMessage;
|
||||
|
||||
public event
|
||||
StateChangeEventHandler StateChange;
|
||||
*/
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -3,23 +3,229 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a set of command-related properties that are used to fill the DataSet and update a data source, all this from a SQL database.
|
||||
/// Represents a set of command-related properties that are used
|
||||
/// to fill the DataSet and update a data source, all this
|
||||
/// from a SQL database.
|
||||
/// </summary>
|
||||
public class SqlDataAdapter : IDbDataAdapter
|
||||
public sealed class SqlDataAdapter : DbDataAdapter, IDbDataAdapter
|
||||
{
|
||||
SqlCommand DeleteCommand{get; set;}
|
||||
#region Properties
|
||||
|
||||
SqlCommand InsertCommand{get; set;}
|
||||
[MonoTODO]
|
||||
public SqlCommand DeleteCommand {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
SqlCommand SelectCommand{get; set;}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommand InsertCommand {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlCommand SelectCommand {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public SqlCommand UpdateCommand {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // Properties
|
||||
|
||||
#region Methods
|
||||
|
||||
[MonoTODO]
|
||||
public override int Fill(DataSet dataSet) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Fill(DataTable dataTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Fill(DataSet dataSet, string srcTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Fill(DataTable dataTable,
|
||||
IDataReader dataReader) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Fill(DataTable dataTable,
|
||||
IDbCommand command,
|
||||
CommandBehavior behavior) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Fill(DataSet dataSet, int startRecord,
|
||||
int maxRecords, string srcTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Fill(DataSet dataSet,
|
||||
string srcTable, IDataReader dataReader,
|
||||
int startRecord, int maxRecords) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Fill(DataSet dataSet,
|
||||
int startRecord, int maxRecords,
|
||||
string srcTable, IDbCommand command,
|
||||
CommandBehavior behavior) {
|
||||
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override DataTable[] FillSchema(DataSet dataSet,
|
||||
SchemaType schemaType) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTable FillSchema(DataTable dataTable,
|
||||
SchemaType schemaType) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTable[] FillSchema(DataSet dataSet,
|
||||
SchemaType schemaType, string srcTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual DataTable FillSchema(DataTable dataTable,
|
||||
SchemaType schemaType, IDbCommand command,
|
||||
CommandBehavior behavior) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual DataTable[] FillSchema(DataSet dataSet,
|
||||
SchemaType schemaType, IDbCommand command,
|
||||
string srcTable, CommandBehavior behavior) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IDataParameter[] GetFillParameters() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Update(DataRow[] dataRows) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override int Update(DataSet dataSet) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Update(DataTable dataTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Update(DataRow[] dataRows,
|
||||
DataTableMapping tableMapping) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Update(DataSet dataSet, string srcTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected override RowUpdatedEventArgs CreateRowUpdatedEvent(
|
||||
DataRow dataRow,
|
||||
IDbCommand command,
|
||||
StatementType statementType,
|
||||
DataTableMapping tableMapping) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected override RowUpdatingEventArgs CreateRowUpdatingEvent(
|
||||
DataRow dataRow,
|
||||
IDbCommand command,
|
||||
StatementType statementType,
|
||||
DataTableMapping tableMapping) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual void OnFillError(FillErrorEventArgs value) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
protected override void OnRowUpdated(RowUpdatedEventArgs value) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
protected override void OnRowUpdating(RowUpdatingEventArgs value) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#endregion // Methods
|
||||
|
||||
#region Events and Delegates
|
||||
|
||||
public event FillErrorEventHandler FillError;
|
||||
|
||||
public event SqlRowUpdatedEventHandler RowUpdated;
|
||||
|
||||
public event SqlRowUpdatingEventHandler RowUpdating;
|
||||
|
||||
#endregion // Events and Delegates
|
||||
|
||||
SqlCommand UpdateCommand{get; set;}
|
||||
}
|
||||
}
|
||||
@@ -3,31 +3,261 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a SQL database.
|
||||
/// Provides a means of reading one or more forward-only streams
|
||||
/// of result sets obtained by executing a command
|
||||
/// at a SQL database.
|
||||
/// </summary>
|
||||
public interface SqlDataReader : IDataReader
|
||||
//public sealed class SqlDataReader : MarshalByRefObject,
|
||||
// IEnumerable, IDataReader, IDisposable, IDataRecord
|
||||
public sealed class SqlDataReader : IEnumerable,
|
||||
IDataReader, IDataRecord
|
||||
{
|
||||
void Close();
|
||||
|
||||
DataTable GetSchemaTable();
|
||||
|
||||
bool NextResult();
|
||||
#region Fields
|
||||
|
||||
bool Read();
|
||||
DataTable tableSchema;
|
||||
DataTable tableRow;
|
||||
|
||||
int Depth{get;}
|
||||
#endregion // Fields
|
||||
|
||||
bool IsClosed{get;}
|
||||
#region Public Methods
|
||||
|
||||
int RecordsAffected{get;}
|
||||
[MonoTODO]
|
||||
public void Close()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTable GetSchemaTable()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool NextResult()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool Read()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public byte GetByte(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public long GetBytes(int i, long fieldOffset,
|
||||
byte[] buffer, int bufferOffset,
|
||||
int length)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public char GetChar(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public long GetChars(int i, long fieldOffset,
|
||||
char[] buffer, int bufferOffset,
|
||||
int length)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public IDataReader GetData(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string GetDataTypeName(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DateTime GetDateTime(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public decimal GetDecimal(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public double GetDouble(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public Type GetFieldType(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public float GetFloat(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public Guid GetGuid(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public short GetInt16(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int GetInt32(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public long GetInt64(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string GetName(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int GetOrdinal(string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string GetString(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public object GetValue(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int GetValues(object[] values)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool IsDBNull(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool GetBoolean(int i)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public IEnumerator GetEnumerator() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#endregion // Public Methods
|
||||
|
||||
#region // Destructors
|
||||
|
||||
[MonoTODO]
|
||||
public void Dispose () {
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlDataReader() {
|
||||
}
|
||||
|
||||
#endregion // Destructors
|
||||
|
||||
|
||||
#region Properties
|
||||
|
||||
public int Depth {
|
||||
[MonoTODO]
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsClosed {
|
||||
[MonoTODO]
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public int RecordsAffected {
|
||||
[MonoTODO]
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public int FieldCount {
|
||||
[MonoTODO]
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public object this[string name] {
|
||||
[MonoTODO]
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public object this[int i] {
|
||||
[MonoTODO]
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // Properties
|
||||
}
|
||||
}
|
||||
@@ -3,18 +3,153 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes an error from a SQL database.
|
||||
/// </summary>
|
||||
public class SqlError
|
||||
[MonoTODO]
|
||||
public sealed class SqlError
|
||||
{
|
||||
// TODO
|
||||
byte theClass = 0;
|
||||
int lineNumber = 0;
|
||||
string message = "";
|
||||
int number = 0;
|
||||
string procedure = "";
|
||||
string server = "";
|
||||
string source = "";
|
||||
byte state = 0;
|
||||
|
||||
internal SqlError(byte theClass, int lineNumber,
|
||||
string message, int number, string procedure,
|
||||
string server, string source, byte state) {
|
||||
this.theClass = theClass;
|
||||
this.lineNumber = lineNumber;
|
||||
this.message = message;
|
||||
this.number = number;
|
||||
this.procedure = procedure;
|
||||
this.server = server;
|
||||
this.source = source;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
[MonoTODO]
|
||||
/// <summary>
|
||||
/// severity level of the error
|
||||
/// </summary>
|
||||
public byte Class {
|
||||
get {
|
||||
return theClass;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int LineNumber {
|
||||
get {
|
||||
return lineNumber;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Message {
|
||||
get {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Number {
|
||||
get {
|
||||
return number;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Procedure {
|
||||
get {
|
||||
return procedure;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Server {
|
||||
get {
|
||||
return server;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Source {
|
||||
get {
|
||||
return source;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public byte State {
|
||||
get {
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
[MonoTODO]
|
||||
public override string ToString ()
|
||||
{
|
||||
String toStr;
|
||||
String stackTrace;
|
||||
stackTrace = " <Stack Trace>";
|
||||
// FIXME: generate the correct SQL error string
|
||||
toStr = "SqlError:" + message + stackTrace;
|
||||
return toStr;
|
||||
}
|
||||
|
||||
internal void SetClass(byte theClass) {
|
||||
this.theClass = theClass;
|
||||
}
|
||||
|
||||
internal void SetLineNumber(int lineNumber) {
|
||||
this.lineNumber = lineNumber;
|
||||
}
|
||||
|
||||
internal void SetMessage(string message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
internal void SetNumber(int number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
internal void SetProcedure(string procedure) {
|
||||
this.procedure = procedure;
|
||||
}
|
||||
|
||||
internal void SetServer(string server) {
|
||||
this.server = server;
|
||||
}
|
||||
|
||||
internal void SetSource(string source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
internal void SetState(byte state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlError.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes an error from a SQL database.
|
||||
/// </summary>
|
||||
[MonoTODO]
|
||||
public sealed class SqlErrorCollection : ICollection, IEnumerable
|
||||
{
|
||||
ArrayList errorList = new ArrayList();
|
||||
|
||||
internal SqlErrorCollection() {
|
||||
}
|
||||
|
||||
internal SqlErrorCollection(byte theClass, int lineNumber,
|
||||
string message, int number, string procedure,
|
||||
string server, string source, byte state) {
|
||||
|
||||
Add (theClass, lineNumber, message,
|
||||
number, procedure,
|
||||
server, source, state);
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
[MonoTODO]
|
||||
public int Count {
|
||||
get {
|
||||
return errorList.Count;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void CopyTo(Array array, int index) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
// [MonoTODO]
|
||||
bool ICollection.IsSynchronized {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
// [MonoTODO]
|
||||
object ICollection.SyncRoot {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public IEnumerator GetEnumerator() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
// Index property (indexer)
|
||||
// [MonoTODO]
|
||||
public SqlError this[int index] {
|
||||
get {
|
||||
return (SqlError) errorList[index];
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
[MonoTODO]
|
||||
public override string ToString()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
#endregion
|
||||
|
||||
internal void Add(SqlError error) {
|
||||
errorList.Add(error);
|
||||
}
|
||||
|
||||
internal void Add(byte theClass, int lineNumber,
|
||||
string message, int number, string procedure,
|
||||
string server, string source, byte state) {
|
||||
|
||||
SqlError error = new SqlError(theClass,
|
||||
lineNumber, message,
|
||||
number, procedure,
|
||||
server, source, state);
|
||||
Add(error);
|
||||
}
|
||||
|
||||
#region Destructors
|
||||
|
||||
[MonoTODO]
|
||||
~SqlErrorCollection()
|
||||
{
|
||||
// FIXME: do the destructor - release resources
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -3,18 +3,200 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Exceptions, as returned by SQL databases.
|
||||
/// </summary>
|
||||
public class SqlException : SystemException
|
||||
public sealed class SqlException : SystemException
|
||||
{
|
||||
// TODO
|
||||
private SqlErrorCollection errors;
|
||||
|
||||
internal SqlException() {
|
||||
errors = new SqlErrorCollection();
|
||||
}
|
||||
|
||||
internal SqlException(byte theClass, int lineNumber,
|
||||
string message, int number, string procedure,
|
||||
string server, string source, byte state) {
|
||||
|
||||
errors = new SqlErrorCollection (theClass,
|
||||
lineNumber, message,
|
||||
number, procedure,
|
||||
server, source, state);
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
[MonoTODO]
|
||||
public byte Class {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return 0; // FIXME: throw exception here?
|
||||
else
|
||||
return errors[0].Class;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetClass(value);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlErrorCollection Errors {
|
||||
get {
|
||||
return errors;
|
||||
}
|
||||
|
||||
set {
|
||||
errors = value;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int LineNumber {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return 0; // FIXME: throw exception here?
|
||||
return errors[0].LineNumber;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetLineNumber(value);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override string Message {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return ""; // FIXME: throw exception?
|
||||
else {
|
||||
String msg = "";
|
||||
int i = 0;
|
||||
|
||||
for(i = 0; i < errors.Count - 1; i++) {
|
||||
msg = msg + errors[i].Message + "\n";
|
||||
}
|
||||
msg = msg + errors[i].Message;
|
||||
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Number {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return 0; // FIXME: throw exception?
|
||||
else
|
||||
return errors[0].Number;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetNumber(value);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Procedure {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return ""; // FIXME: throw exception?
|
||||
else
|
||||
return errors[0].Procedure;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetProcedure(value);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Server {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return ""; // FIXME: throw exception?
|
||||
else
|
||||
return errors[0].Server;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetServer(value);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override string Source {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return ""; // FIXME: throw exception?
|
||||
else
|
||||
return errors[0].Source;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetSource(value);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public byte State {
|
||||
get {
|
||||
if(errors.Count == 0)
|
||||
return 0; // FIXME: throw exception?
|
||||
else
|
||||
return errors[0].State;
|
||||
}
|
||||
|
||||
set {
|
||||
errors[0].SetState(value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // Properties
|
||||
|
||||
#region Methods
|
||||
|
||||
[MonoTODO]
|
||||
public override void GetObjectData(SerializationInfo si,
|
||||
StreamingContext context) {
|
||||
// FIXME: to do
|
||||
}
|
||||
|
||||
// [Serializable]
|
||||
// [ClassInterface(ClassInterfaceType.AutoDual)]
|
||||
public override string ToString() {
|
||||
String toStr = "";
|
||||
for (int i = 0; i < errors.Count; i++) {
|
||||
toStr = toStr + errors[i].ToString() + "\n";
|
||||
}
|
||||
return toStr;
|
||||
}
|
||||
|
||||
internal void Add(byte theClass, int lineNumber,
|
||||
string message, int number, string procedure,
|
||||
string server, string source, byte state) {
|
||||
|
||||
errors.Add (theClass, lineNumber, message,
|
||||
number, procedure,
|
||||
server, source, state);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlException() {
|
||||
// FIXME: destructor to release resources
|
||||
}
|
||||
|
||||
#endregion // Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlInfoMessageEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public sealed class SqlInfoMessageEventArgs : EventArgs
|
||||
{
|
||||
[MonoTODO]
|
||||
public SqlErrorCollection Errors {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Message
|
||||
{
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string Source {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override string ToString() {
|
||||
// representation of InfoMessage event
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlInfoMessageEventArgs() {
|
||||
// FIXME: destructor needs to release resources
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlInfoMessageEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public delegate void
|
||||
SqlInfoMessageEventHandler (object sender,
|
||||
SqlInfoMessageEventArgs e);
|
||||
}
|
||||
@@ -3,37 +3,194 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc.
|
||||
// (C) Ximian, Inc. 2002
|
||||
//
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a parameter to a Command object, and optionally, its mapping to DataSet columns; and is implemented by .NET data providers that access data sources.
|
||||
/// Represents a parameter to a Command object, and optionally,
|
||||
/// its mapping to DataSet columns; and is implemented by .NET
|
||||
/// data providers that access data sources.
|
||||
/// </summary>
|
||||
public class SqlParameter : IDbDataParameter, IDataParameter
|
||||
//public sealed class SqlParameter : MarshalByRefObject,
|
||||
// IDbDataParameter, IDataParameter, ICloneable
|
||||
public sealed class SqlParameter : IDbDataParameter, IDataParameter
|
||||
{
|
||||
[MonoTODO]
|
||||
public SqlParameter () {
|
||||
// FIXME: do this
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter (string parameterName, object value) {
|
||||
// FIXME: do this
|
||||
}
|
||||
|
||||
DbType DbType{get;set;}
|
||||
[MonoTODO]
|
||||
public SqlParameter(string parameterName, SqlDbType dbType) {
|
||||
// FIXME: do this
|
||||
}
|
||||
|
||||
ParameterDirection Direction{get;set;}
|
||||
[MonoTODO]
|
||||
public SqlParameter(string parameterName, SqlDbType dbType,
|
||||
int size) {
|
||||
// FIXME: do this
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter(string parameterName, SqlDbType dbType,
|
||||
int size, string sourceColumn) {
|
||||
// FIXME: do this
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter(string parameterName, SqlDbType dbType,
|
||||
int size, ParameterDirection direction,
|
||||
bool isNullable, byte precision,
|
||||
byte scale, string sourceColumn,
|
||||
DataRowVersion sourceVersion, object value) {
|
||||
// FIXME: do this
|
||||
}
|
||||
|
||||
bool IsNullable{get;}
|
||||
|
||||
string ParameterName{get;set;}
|
||||
[MonoTODO]
|
||||
public DbType DbType {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
string SourceColumn{get;set;}
|
||||
[MonoTODO]
|
||||
public ParameterDirection Direction {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
DataRowVersion SourceVersion {get;set;}
|
||||
[MonoTODO]
|
||||
public bool IsNullable {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
object Value {get;set;}
|
||||
[MonoTODO]
|
||||
public int Offset {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
byte Precision{get; set;}
|
||||
[MonoTODO]
|
||||
public string ParameterName {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
byte Scale{get; set;}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
int Size{get; set;}
|
||||
[MonoTODO]
|
||||
public string SourceColumn {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataRowVersion SourceVersion {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlDbType SqlDbType {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public object Value {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public byte Precision {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public byte Scale {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Size
|
||||
{
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override string ToString() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,25 +3,229 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Collects all parameters relevant to a Command object and their mappings to DataSet columns.
|
||||
/// Collects all parameters relevant to a Command object
|
||||
/// and their mappings to DataSet columns.
|
||||
/// </summary>
|
||||
public class SqlParameterCollection : IDataParameterCollection
|
||||
// public sealed class SqlParameterCollection : MarshalByRefObject,
|
||||
// IDataParameterCollection, IList, ICollection, IEnumerable
|
||||
public sealed class SqlParameterCollection : IDataParameterCollection
|
||||
{
|
||||
void RemoveAt(string parameterName);
|
||||
[MonoTODO]
|
||||
public void RemoveAt(string parameterName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int IndexOf(string parameterName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool Contains(string parameterName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
// [MonoTODO]
|
||||
public object this[string parameterName]
|
||||
{
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Add( object value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter Add(SqlParameter value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter Add(string parameterName, object value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter Add(string parameterName, SqlDbType sqlDbType)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter Add(string parameterName,
|
||||
SqlDbType sqlDbType, int size)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlParameter Add(string parameterName,
|
||||
SqlDbType sqlDbType, int size, string sourceColumn)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Clear()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool Contains(object value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/*
|
||||
[MonoTODO]
|
||||
public bool Contains(string value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
int IndexOf(string parameterName);
|
||||
|
||||
bool Contains(string parameterName);
|
||||
*/
|
||||
|
||||
[MonoTODO]
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int IndexOf(object value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
/*
|
||||
[MonoTODO]
|
||||
public int IndexOf(string parameterName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
*/
|
||||
[MonoTODO]
|
||||
public void Insert(int index, object value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Remove(object value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
/*
|
||||
[MonoTODO]
|
||||
public void RemoveAt(string parameterName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
*/
|
||||
/*
|
||||
[MonoTODO]
|
||||
[Serializable]
|
||||
[ClassInterface(ClassInterfaceType.AutoDual)]
|
||||
~SqlParameterCollection();
|
||||
*/
|
||||
|
||||
[MonoTODO]
|
||||
public int Count {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
// [MonoTODO]
|
||||
object IList.this[int index] {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
// [MonoTODO]
|
||||
public SqlParameter this[int index] {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
/*
|
||||
[MonoTODO]
|
||||
public SqlParameter this[string parameterName] {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
bool IList.IsFixedSize {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
bool IList.IsReadOnly {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
bool ICollection.IsSynchronized {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
object ICollection.SyncRoot {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
object this[string parameterName]{get; set;}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlRowUpdatedEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient {
|
||||
public sealed class SqlRowUpdatedEventArgs : RowUpdatedEventArgs {
|
||||
|
||||
[MonoTODO]
|
||||
public SqlRowUpdatedEventArgs (DataRow row,
|
||||
IDbCommand command, StatementType statementType,
|
||||
DataTableMapping tableMapping) {
|
||||
// FIXME: do the constructor
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public new SqlCommand Command {
|
||||
get {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlRowUpdatedEventArgs () {
|
||||
// FIXME: need destructor to release resources
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlRowUpdatedEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public delegate void SqlRowUpdatedEventHandler(object sender,
|
||||
SqlRowUpdatedEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlRowUpdatingEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public sealed class SqlRowUpdatingEventArgs : RowUpdatingEventArgs
|
||||
{
|
||||
[MonoTODO]
|
||||
public SqlRowUpdatingEventArgs( DataRow row,
|
||||
IDbCommand command, StatementType statementType,
|
||||
DataTableMapping tableMapping) {
|
||||
// FIXME: do the constructor
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public new SqlCommand Command {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlRowUpdatingEventArgs() {
|
||||
// FIXME: create destructor to release resources
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlRowUpdatingEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public delegate void SqlRowUpdatingEventHandler(object sender,
|
||||
SqlRowUpdatingEventArgs e);
|
||||
}
|
||||
@@ -3,23 +3,189 @@
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc.
|
||||
// (C) Ximian, Inc. 2002
|
||||
//
|
||||
|
||||
// use #define DEBUG_SqlTransaction if you want to spew debug messages
|
||||
// #define DEBUG_SqlTransaction
|
||||
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a transaction to be performed at a SQL database.
|
||||
/// Represents a transaction to be performed on a SQL database.
|
||||
/// </summary>
|
||||
public interface SqlTransaction : IDbTransaction
|
||||
// public sealed class SqlTransaction : MarshalByRefObject,
|
||||
// IDbTransaction, IDisposable
|
||||
public sealed class SqlTransaction : IDbTransaction
|
||||
{
|
||||
void Commit();
|
||||
#region Fields
|
||||
|
||||
void Rollback();
|
||||
private bool doingTransaction = false;
|
||||
private SqlConnection conn = null;
|
||||
private IsolationLevel isolationLevel =
|
||||
IsolationLevel.ReadCommitted;
|
||||
// There are only two IsolationLevel's for PostgreSQL:
|
||||
// ReadCommitted and Serializable,
|
||||
// but ReadCommitted is the default
|
||||
|
||||
SqlConnection Connection{get;}
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
IsolationLevel IsolationLevel{get;}
|
||||
}
|
||||
[MonoTODO]
|
||||
public void Commit ()
|
||||
{
|
||||
if(doingTransaction == false)
|
||||
throw new InvalidOperationException(
|
||||
"Begin transaction was not " +
|
||||
"done earlier " +
|
||||
"thus PostgreSQL can not " +
|
||||
"Commit transaction.");
|
||||
|
||||
SqlCommand cmd = new SqlCommand("COMMIT", conn);
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
doingTransaction = false;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Rollback()
|
||||
{
|
||||
if(doingTransaction == false)
|
||||
throw new InvalidOperationException(
|
||||
"Begin transaction was not " +
|
||||
"done earlier " +
|
||||
"thus PostgreSQL can not " +
|
||||
"Rollback transaction.");
|
||||
|
||||
SqlCommand cmd = new SqlCommand("ROLLBACK", conn);
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
doingTransaction = false;
|
||||
}
|
||||
|
||||
// For PostgreSQL, Rollback(string) will not be implemented
|
||||
// because PostgreSQL does not support Savepoints
|
||||
[Obsolete]
|
||||
public void Rollback(string transactionName) {
|
||||
// throw new NotImplementedException ();
|
||||
Rollback();
|
||||
}
|
||||
|
||||
// For PostgreSQL, Save(string) will not be implemented
|
||||
// because PostgreSQL does not support Savepoints
|
||||
[Obsolete]
|
||||
public void Save (string savePointName) {
|
||||
// throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#endregion // Public Methods
|
||||
|
||||
#region Internal Methods to System.Data.dll Assembly
|
||||
|
||||
internal void Begin()
|
||||
{
|
||||
if(doingTransaction == true)
|
||||
throw new InvalidOperationException(
|
||||
"Transaction has begun " +
|
||||
"and PostgreSQL does not " +
|
||||
"support nested transactions.");
|
||||
|
||||
SqlCommand cmd = new SqlCommand("BEGIN", conn);
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
doingTransaction = true;
|
||||
}
|
||||
|
||||
internal void SetIsolationLevel(IsolationLevel isoLevel)
|
||||
{
|
||||
String sSql = "SET TRANSACTION ISOLATION LEVEL ";
|
||||
|
||||
switch (isoLevel)
|
||||
{
|
||||
case IsolationLevel.ReadCommitted:
|
||||
sSql += "READ COMMITTED";
|
||||
break;
|
||||
|
||||
case IsolationLevel.Serializable:
|
||||
sSql += "SERIALIZABLE";
|
||||
break;
|
||||
|
||||
default:
|
||||
// FIXME: generate exception here
|
||||
// PostgreSQL only supports:
|
||||
// ReadCommitted or Serializable
|
||||
break;
|
||||
}
|
||||
SqlCommand cmd = new SqlCommand(sSql, conn);
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
this.isolationLevel = isoLevel;
|
||||
}
|
||||
|
||||
internal void SetConnection(SqlConnection connection)
|
||||
{
|
||||
this.conn = connection;
|
||||
}
|
||||
|
||||
#endregion // Internal Methods to System.Data.dll Assembly
|
||||
|
||||
#region Properties
|
||||
|
||||
IDbConnection IDbTransaction.Connection {
|
||||
get {
|
||||
return Connection;
|
||||
}
|
||||
}
|
||||
|
||||
public SqlConnection Connection {
|
||||
get {
|
||||
return conn;
|
||||
}
|
||||
}
|
||||
|
||||
public IsolationLevel IsolationLevel {
|
||||
get {
|
||||
return isolationLevel;
|
||||
}
|
||||
}
|
||||
|
||||
internal bool DoingTransaction {
|
||||
get {
|
||||
return doingTransaction;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Destructors
|
||||
|
||||
// Destructors aka Finalize and Dispose
|
||||
|
||||
[MonoTODO]
|
||||
public void Dispose()
|
||||
{
|
||||
// FIXME: need to properly release resources
|
||||
// Dispose(true);
|
||||
}
|
||||
|
||||
// Destructor
|
||||
[MonoTODO]
|
||||
// [Serializable]
|
||||
// [ClassInterface(ClassInterfaceType.AutoDual)]
|
||||
~SqlTransaction() {
|
||||
// FIXME: need to properly release resources
|
||||
// Dispose(false);
|
||||
}
|
||||
|
||||
#endregion // Destructors
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,471 @@
|
||||
//
|
||||
// System.Data.SqlClient.PostgresLibrary.cs
|
||||
//
|
||||
// PInvoke methods to libpq
|
||||
// which is PostgreSQL client library
|
||||
//
|
||||
// May also contain enumerations,
|
||||
// data types, or wrapper methods.
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/* IMPORTANT: DO NOT CHANGE ANY OF THESE ENUMS */
|
||||
|
||||
internal enum ConnStatusType
|
||||
{
|
||||
CONNECTION_OK,
|
||||
CONNECTION_BAD,
|
||||
CONNECTION_STARTED,
|
||||
CONNECTION_MADE,
|
||||
CONNECTION_AWAITING_RESPONSE,
|
||||
CONNECTION_AUTH_OK,
|
||||
CONNECTION_SETENV
|
||||
}
|
||||
|
||||
internal enum PostgresPollingStatusType
|
||||
{
|
||||
PGRES_POLLING_FAILED = 0,
|
||||
PGRES_POLLING_READING,
|
||||
PGRES_POLLING_WRITING,
|
||||
PGRES_POLLING_OK,
|
||||
PGRES_POLLING_ACTIVE
|
||||
}
|
||||
|
||||
internal enum ExecStatusType
|
||||
{
|
||||
PGRES_EMPTY_QUERY = 0,
|
||||
PGRES_COMMAND_OK,
|
||||
PGRES_TUPLES_OK,
|
||||
PGRES_COPY_OUT,
|
||||
PGRES_COPY_IN,
|
||||
PGRES_BAD_RESPONSE,
|
||||
PGRES_NONFATAL_ERROR,
|
||||
PGRES_FATAL_ERROR
|
||||
}
|
||||
|
||||
sealed internal class PostgresLibrary
|
||||
{
|
||||
#region PInvoke Functions
|
||||
|
||||
// pinvoke prototypes to PostgreSQL client library
|
||||
// pq.dll on windows and libpq.so on linux
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQconnectStart (string conninfo);
|
||||
// PGconn *PQconnectStart(const char *conninfo);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern PostgresPollingStatusType PQconnectPoll (IntPtr conn);
|
||||
// PostgresPollingStatusType PQconnectPoll(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQconnectdb (string conninfo);
|
||||
// PGconn *PQconnectdb(const char *conninfo);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQsetdbLogin (string pghost,
|
||||
string pgport, string pgoptions,
|
||||
string pgtty, string dbName,
|
||||
string login, string pwd);
|
||||
// PGconn *PQsetdbLogin(const char *pghost,
|
||||
// const char *pgport, const char *pgoptions,
|
||||
// const char *pgtty, const char *dbName,
|
||||
// const char *login, const char *pwd);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQfinish (IntPtr conn);
|
||||
// void PQfinish(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQconndefaults ();
|
||||
// PQconninfoOption *PQconndefaults(void);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQconninfoFree (IntPtr connOptions);
|
||||
// void PQconninfoFree(PQconninfoOption *connOptions);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQresetStart (IntPtr conn);
|
||||
// int PQresetStart(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQresetPoll (IntPtr conn);
|
||||
// PostgresPollingStatusType PQresetPoll(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQreset (IntPtr conn);
|
||||
// void PQreset(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQrequestCancel (IntPtr conn);
|
||||
// int PQrequestCancel(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQdb (IntPtr conn);
|
||||
// char *PQdb(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQuser (IntPtr conn);
|
||||
// char *PQuser(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQpass (IntPtr conn);
|
||||
// char *PQpass(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQhost (IntPtr conn);
|
||||
// char *PQhost(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQport (IntPtr conn);
|
||||
// char *PQport(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQtty (IntPtr conn);
|
||||
// char *PQtty(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQoptions (IntPtr conn);
|
||||
// char *PQoptions(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern ConnStatusType PQstatus (IntPtr conn);
|
||||
// ConnStatusType PQstatus(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQerrorMessage (IntPtr conn);
|
||||
// char *PQerrorMessage(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQsocket (IntPtr conn);
|
||||
// int PQsocket(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQbackendPID (IntPtr conn);
|
||||
// int PQbackendPID(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQclientEncoding (IntPtr conn);
|
||||
// int PQclientEncoding(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQsetClientEncoding (IntPtr conn,
|
||||
string encoding);
|
||||
// int PQsetClientEncoding(PGconn *conn,
|
||||
// const char *encoding);
|
||||
|
||||
//FIXME: when loading, causes runtime exception
|
||||
//[DllImport("pq")]
|
||||
//public static extern IntPtr PQgetssl (IntPtr conn);
|
||||
// SSL *PQgetssl(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQtrace (IntPtr conn,
|
||||
IntPtr debug_port);
|
||||
// void PQtrace(PGconn *conn,
|
||||
// FILE *debug_port);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQuntrace (IntPtr conn);
|
||||
// void PQuntrace(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQsetNoticeProcessor (IntPtr conn,
|
||||
IntPtr proc, IntPtr arg);
|
||||
// PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
|
||||
// PQnoticeProcessor proc, void *arg);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQescapeString (string to,
|
||||
string from, int length);
|
||||
// size_t PQescapeString(char *to,
|
||||
// const char *from, size_t length);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQescapeBytea (string bintext,
|
||||
int binlen, IntPtr bytealen);
|
||||
// unsigned char *PQescapeBytea(unsigned char *bintext,
|
||||
// size_t binlen, size_t *bytealen);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQexec (IntPtr conn,
|
||||
string query);
|
||||
// PGresult *PQexec(PGconn *conn,
|
||||
// const char *query);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQnotifies (IntPtr conn);
|
||||
// PGnotify *PQnotifies(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQfreeNotify (IntPtr notify);
|
||||
// void PQfreeNotify(PGnotify *notify);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQsendQuery (IntPtr conn,
|
||||
string query);
|
||||
// int PQsendQuery(PGconn *conn,
|
||||
// const char *query);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQgetResult (IntPtr conn);
|
||||
// PGresult *PQgetResult(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQisBusy (IntPtr conn);
|
||||
// int PQisBusy(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQconsumeInput (IntPtr conn);
|
||||
// int PQconsumeInput(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQgetline (IntPtr conn,
|
||||
string str, int length);
|
||||
// int PQgetline(PGconn *conn,
|
||||
// char *string, int length);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQputline (IntPtr conn,
|
||||
string str);
|
||||
// int PQputline(PGconn *conn,
|
||||
// const char *string);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQgetlineAsync (IntPtr conn,
|
||||
string buffer, int bufsize);
|
||||
// int PQgetlineAsync(PGconn *conn, char *buffer,
|
||||
// int bufsize);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQputnbytes (IntPtr conn,
|
||||
string buffer, int nbytes);
|
||||
// int PQputnbytes(PGconn *conn,
|
||||
//const char *buffer, int nbytes);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQendcopy (IntPtr conn);
|
||||
// int PQendcopy(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQsetnonblocking (IntPtr conn,
|
||||
int arg);
|
||||
// int PQsetnonblocking(PGconn *conn, int arg);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQisnonblocking (IntPtr conn);
|
||||
// int PQisnonblocking(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQflush (IntPtr conn);
|
||||
// int PQflush(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQfn (IntPtr conn, int fnid,
|
||||
IntPtr result_buf, IntPtr result_len,
|
||||
int result_is_int, IntPtr args,
|
||||
int nargs);
|
||||
// PGresult *PQfn(PGconn *conn, int fnid,
|
||||
// int *result_buf, int *result_len,
|
||||
// int result_is_int, const PQArgBlock *args,
|
||||
// int nargs);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern ExecStatusType PQresultStatus (IntPtr res);
|
||||
// ExecStatusType PQresultStatus(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQresStatus (ExecStatusType status);
|
||||
// char *PQresStatus(ExecStatusType status);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQresultErrorMessage (IntPtr res);
|
||||
// char *PQresultErrorMessage(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQntuples (IntPtr res);
|
||||
// int PQntuples(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQnfields (IntPtr res);
|
||||
// int PQnfields(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQbinaryTuples (IntPtr res);
|
||||
// int PQbinaryTuples(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQfname (IntPtr res,
|
||||
int field_num);
|
||||
// char *PQfname(const PGresult *res,
|
||||
// int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQfnumber (IntPtr res,
|
||||
string field_name);
|
||||
// int PQfnumber(const PGresult *res,
|
||||
// const char *field_name);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQftype (IntPtr res,
|
||||
int field_num);
|
||||
// Oid PQftype(const PGresult *res,
|
||||
// int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQfsize (IntPtr res,
|
||||
int field_num);
|
||||
// int PQfsize(const PGresult *res,
|
||||
// int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQfmod (IntPtr res, int field_num);
|
||||
// int PQfmod(const PGresult *res, int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQcmdStatus (IntPtr res);
|
||||
// char *PQcmdStatus(PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQoidStatus (IntPtr res);
|
||||
// char *PQoidStatus(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQoidValue (IntPtr res);
|
||||
// Oid PQoidValue(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQcmdTuples (IntPtr res);
|
||||
// char *PQcmdTuples(PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQgetvalue (IntPtr res,
|
||||
int tup_num, int field_num);
|
||||
// char *PQgetvalue(const PGresult *res,
|
||||
// int tup_num, int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQgetlength (IntPtr res,
|
||||
int tup_num, int field_num);
|
||||
// int PQgetlength(const PGresult *res,
|
||||
// int tup_num, int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQgetisnull (IntPtr res,
|
||||
int tup_num, int field_num);
|
||||
// int PQgetisnull(const PGresult *res,
|
||||
// int tup_num, int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQclear (IntPtr res);
|
||||
// void PQclear(PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQmakeEmptyPGresult (IntPtr conn,
|
||||
IntPtr status);
|
||||
// PGresult *PQmakeEmptyPGresult(PGconn *conn,
|
||||
// ExecStatusType status);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQprint (IntPtr fout,
|
||||
IntPtr res, IntPtr ps);
|
||||
// void PQprint(FILE *fout,
|
||||
// const PGresult *res, const PQprintOpt *ps);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQdisplayTuples (IntPtr res,
|
||||
IntPtr fp, int fillAlign, string fieldSep,
|
||||
int printHeader, int quiet);
|
||||
// void PQdisplayTuples(const PGresult *res,
|
||||
// FILE *fp, int fillAlign, const char *fieldSep,
|
||||
// int printHeader, int quiet);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQprintTuples (IntPtr res,
|
||||
IntPtr fout, int printAttName, int terseOutput,
|
||||
int width);
|
||||
// void PQprintTuples(const PGresult *res,
|
||||
// FILE *fout, int printAttName, int terseOutput,
|
||||
// int width);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_open (IntPtr conn,
|
||||
int lobjId, int mode);
|
||||
// int lo_open(PGconn *conn,
|
||||
// Oid lobjId, int mode);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_close (IntPtr conn, int fd);
|
||||
// int lo_close(PGconn *conn, int fd);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_read (IntPtr conn,
|
||||
int fd, string buf, int len);
|
||||
// int lo_read(PGconn *conn,
|
||||
// int fd, char *buf, size_t len);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_write (IntPtr conn,
|
||||
int fd, string buf, int len);
|
||||
// int lo_write(PGconn *conn,
|
||||
// int fd, char *buf, size_t len);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_lseek (IntPtr conn,
|
||||
int fd, int offset, int whence);
|
||||
// int lo_lseek(PGconn *conn,
|
||||
// int fd, int offset, int whence);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_creat (IntPtr conn,
|
||||
int mode);
|
||||
// Oid lo_creat(PGconn *conn,
|
||||
// int mode);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_tell (IntPtr conn, int fd);
|
||||
// int lo_tell(PGconn *conn, int fd);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_unlink (IntPtr conn,
|
||||
int lobjId);
|
||||
// int lo_unlink(PGconn *conn,
|
||||
// Oid lobjId);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_import (IntPtr conn,
|
||||
string filename);
|
||||
// Oid lo_import(PGconn *conn,
|
||||
// const char *filename);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_export (IntPtr conn,
|
||||
int lobjId, string filename);
|
||||
// int lo_export(PGconn *conn,
|
||||
// Oid lobjId, const char *filename);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQmblen (string s,
|
||||
int encoding);
|
||||
// int PQmblen(const unsigned char *s,
|
||||
// int encoding);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQenv2encoding ();
|
||||
// int PQenv2encoding(void);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlDataReader.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a SQL database.
|
||||
/// </summary>
|
||||
public class SqlErrors : ICollection, IEnumerable
|
||||
{
|
||||
// TODO
|
||||
|
||||
}
|
||||
}
|
||||
+306
-10
@@ -1,3 +1,298 @@
|
||||
2002-04-23 Daniel Morgan <[email protected]>
|
||||
|
||||
* System.Data.build: modified - added new
|
||||
files to exclude from build
|
||||
|
||||
* System.Data/Constraint.cs
|
||||
* System.Data/ConstraintCollection.cs
|
||||
* System.Data/InternalDataCollectionBase.cs: added -
|
||||
stubs which are needed to build DataTable.cs
|
||||
|
||||
* TODO: modified - added more classes TODO and
|
||||
added more stuff TODO, such as, create script
|
||||
to create test database monotestdb for testing
|
||||
classes in System.Data
|
||||
|
||||
2002-04-23 Rodrigo Moya <[email protected]>
|
||||
|
||||
* System.Data.Common/DataAdapter.cs:
|
||||
* System.Data.Common/DataColumnMappingCollection.cs:
|
||||
* System.Data.Common/DataTableMappingCollection.cs:
|
||||
* System.Data.Common/DbDataPermission.cs:
|
||||
* System.Data.Common/DbDataPermissionAttribute.cs: some
|
||||
compilation errors fixed.
|
||||
|
||||
2002-04-23 Daniel Morgan <[email protected]>
|
||||
|
||||
* TODO: modified - added classes TODO, and
|
||||
a poor attempt at System.Data plan
|
||||
|
||||
2002-04-23 Daniel Morgan <[email protected]>
|
||||
|
||||
* ChangeLog: modified - put tabs where they belong
|
||||
|
||||
* System.Data.SqlClient/SqlDataReader.cs
|
||||
* System.Data/DataColumn.cs: modified - compile errors
|
||||
trying to compile SqlDataAdapter and dependencies
|
||||
|
||||
2002-04-23 Daniel Morgan <[email protected]>
|
||||
|
||||
* System.Data.SqlTypes/SqlBoolean.cs
|
||||
* System.Data.SqlTypes/SqlCompareOptions.cs
|
||||
* System.Data.SqlTypes/SqlInt32.cs
|
||||
* System.Data.SqlTypes/SqlString.cs: added - new stubs
|
||||
|
||||
* System.Data/DataTable.cs
|
||||
* System.Data.SqlClient/SqlCommand.cs
|
||||
* System.Data.SqlClient/SqlConnection.cs
|
||||
* System.Data.SqlClient/SqlError.cs
|
||||
* System.Data.SqlClient/SqlTransaction.cs: modified -
|
||||
misc. tweaks
|
||||
|
||||
* System.Data.SqlClient/SqlException.cs: modified -
|
||||
missing Message on indexer for Message property
|
||||
|
||||
2002-04-21 Daniel Morgan <[email protected]>
|
||||
|
||||
* System.Data.SqlClient/SqlCommand.cs: modified - to
|
||||
compile using mcs. This problem is
|
||||
returning a stronger type in csc vs. msc
|
||||
|
||||
* System.Data.SqlClient/SqlConnection.cs: modified - msc
|
||||
can not do a using PGconn = IntPtr; and then declare
|
||||
with PGconn pgConn = IntPtr.Zero;
|
||||
Thiw works under csc though. Had to comment using and
|
||||
changed declaration to IntPtr pgConn = IntPtr.Zero;
|
||||
Also, got rid of compile warnings for hostaddr and port.
|
||||
|
||||
* System.Data.SqlClient/SqlErrorCollection.cs: modified - got
|
||||
rid of compile warnings. Commented MonoTODO attribute because mcs
|
||||
doesn't seem to work with C# array property indexer (Item)
|
||||
this[int index]
|
||||
|
||||
* System.Data.SqlClient/SqlParameterCollection.cs: modified -
|
||||
commented MonoTODO attribute for indexer for mcs compiling
|
||||
|
||||
* Test/TestSqlIsolationLevel.cs:
|
||||
* Test/TestSqlInsert.cs:
|
||||
* Test/TestSqlException.cs: modified -
|
||||
removed extra ExecuteNonQuery which caused two inserted rows
|
||||
|
||||
2002-04-20 Daniel Morgan <[email protected]>
|
||||
|
||||
* System.Data/StateChangeEventArgs.cs - added
|
||||
needed to compile System.Data.dll with mcs.
|
||||
|
||||
2002-04-20 Daniel Morgan <[email protected]>
|
||||
|
||||
* System.Data.OleDb: added directory - for OleDb database
|
||||
provider classes
|
||||
|
||||
* System.Data.SqlClient/SqlClientPermission.cs
|
||||
* System.Data.SqlClient/SqlClientPermissionAttribute.cs
|
||||
* System.Data.SqlClient/SqlCommandBuilder.cs
|
||||
* System.Data.SqlClient/SqlInfoMessageEventHandler.cs
|
||||
* System.Data.SqlClient/SqlRowUpdatedEventArgs.cs
|
||||
* System.Data.SqlClient/SqlRowUpdatedEventHandler.cs
|
||||
* System.Data.SqlClient/SqlRowUpdatingEventArgs.cs
|
||||
* System.Data.SqlClient/SqlRowUpdatingEventHandler.cs
|
||||
* Test/TestSqlException.cs
|
||||
* Test/TestSqlIsolationLevel.cs: added - more tests
|
||||
|
||||
* System.Data.build: modified - added new files - excludes these too
|
||||
|
||||
* System.Data.SqlClient/PostgresLibrary.cs - modified - comment
|
||||
|
||||
* System.Data.SqlClient/SqlConnection.cs
|
||||
* System.Data.SqlClient/SqlCommand.cs
|
||||
* System.Data.SqlClient/SqlTransaction.cs
|
||||
* System.Data.SqlClient/SqlException.cs
|
||||
* System.Data.SqlClient/SqlErrorCollection.cs
|
||||
* System.Data.SqlClient/SqlError.cs: modified - transaction and
|
||||
exception/error handling. SqlConnection(connectionString)
|
||||
constructor should not automatically connect.
|
||||
|
||||
* System.Data.SqlClient/SqlDataReader.cs
|
||||
* System.Data.SqlClient/SqlDataAdapter.cs
|
||||
* System.Data.SqlClient/SqlParameter.cs
|
||||
* System.Data.SqlClient/SqlParameterCollection.cs: modified -
|
||||
added using System.ComponentModel;
|
||||
|
||||
* Test/TestSqlInsert.cs: modified - to use transaction
|
||||
|
||||
2002-04-17 Rodrigo Moya <[email protected]>
|
||||
|
||||
* System.Data/DataRow.cs: new skeletons.
|
||||
|
||||
* System.Data.Common/DataAdapter.cs:
|
||||
* System.Data.Common/DataColumnMapping.cs:
|
||||
* System.Data.Common/DataColumnMappingCollection.cs:
|
||||
* System.Data.Common/DataTableMapping.cs:
|
||||
* System.Data.Common/DataTableMappingCollection.cs:
|
||||
* System.Data.Common/DbDataAdapter.cs:
|
||||
* System.Data.Common/RowUpdatedEventArgs.cs:
|
||||
* System.Data.SqlClient/SqlDataAdapter.cs:
|
||||
* System.Data.SqlClient/SqlInfoMessageEventArgs.cs: compilation
|
||||
fixes for Linux.
|
||||
|
||||
* System.Data.Common/DbDataRecord.cs:
|
||||
* System.Data.Common/DbEnumerator.cs: removed MS implementation
|
||||
internal classes.
|
||||
|
||||
2002-04-17 Daniel Morgan <[email protected]>
|
||||
|
||||
* Test/TestSqlInsert.cs: modified - do
|
||||
a SQL DELETE before SQL INSERT of row so you can use this
|
||||
test over and over.
|
||||
|
||||
* System.Data.SqlClient/SqlTransaction.cs: modified - default
|
||||
IsolationLevel for PostgreSQL is ReadCommitted. However,
|
||||
PostgreSQL allows Serializable as well.
|
||||
(Thanks to Gonzalo for that!)
|
||||
|
||||
* System.Data.SqlClient/SqlConnection.cs: modified
|
||||
* System.Data.SqlClient/SqlCommand.cs: modified
|
||||
* System.Data.SqlClient/SqlTransaction.cs: modified - got transactions
|
||||
working; however, we still need to implement SQL errors
|
||||
and exceptions to properly handle transactions. Also, added
|
||||
status and error message support from the PostgreSQL database.
|
||||
Currently, this does a Console.WriteLine() to display the
|
||||
status and error messages, but this is a TODO
|
||||
for SQL errors and exceptions.
|
||||
|
||||
* System.Data/TODOAttribute.cs: added - needed MonoTODO
|
||||
attribute for System.Data.dll assembly
|
||||
|
||||
* System.Data/IDbCommand.cs: modified - commented
|
||||
overloaded method ExecuteReader
|
||||
so System.Data.SqlClient.SqlCommand can compile
|
||||
|
||||
* System.Data/IDbCommand.cs: modified
|
||||
* System.Data/IDbConnection.cs: modified - added using System;
|
||||
* System.Data/IDataParameter.cs
|
||||
|
||||
* System.Data.build: modified - build classes
|
||||
in System.Data.SqlClient and exclude others in System.Data
|
||||
|
||||
* System.Data.SqlClient/PostgresLibrary.cs: modified - change
|
||||
parameter data type from IntPtr to enum ExecStatusType
|
||||
|
||||
* ChangeLog: modified - corrected previous entries in log
|
||||
|
||||
2002-04-16 Rodrigo Moya <[email protected]>
|
||||
|
||||
* System.Data.Common/DataColumnMappingCollection.cs: added basic
|
||||
implementation. Still missing some stuff.
|
||||
|
||||
2002-04-16 Daniel Morgan <[email protected]>
|
||||
|
||||
* System.Data.SqlClient/SqlConnection.cs: modified - got
|
||||
to compile, run, and connect to PostgreSQL database
|
||||
|
||||
* System.Data.SqlClient/SqlCommand.cs: modified - got
|
||||
to compile, run, and execute a SQL INSERT command
|
||||
which successfully inserted a row
|
||||
into the PostgreSQL database
|
||||
|
||||
* System.Data.SqlClient/SqlTransaction.cs: modified
|
||||
* System.Data.SqlClient/SqlParameter.cs: modified
|
||||
* System.Data.SqlClient/SqlParameterCollection.cs: modified
|
||||
* System.Data.SqlClient/SqlError.cs: modified
|
||||
* System.Data.SqlClient/SqlErrorCollection.cs: modified
|
||||
* System.Data.SqlClient/SqlException.cs: modified
|
||||
* System.Data.SqlClient/PostgresLibrary.cs: modified - to compile
|
||||
|
||||
* System.Data.SqlClient/SqlAdapter: modified
|
||||
* System.Data.SqlClient/SqlReader: modified - add more stubs
|
||||
|
||||
2002-04-16 Daniel Morgan <[email protected]>
|
||||
|
||||
* Test/TestSqlInsert.cs: added
|
||||
|
||||
2002-04-15 Daniel Morgan <[email protected]>
|
||||
|
||||
* System.Data.SqlClient/SqlInfoMessageEventArgs.cs: added - using in
|
||||
class SqlConnecition
|
||||
* System.Data.SqlClient/SqlErrorCollection.cs: added
|
||||
* System.Data.SqlClient/SqlErrors.cs: removed - no such class SqlErrors
|
||||
|
||||
2002-04-15 Christopher Podurgiel <[email protected]>
|
||||
|
||||
* System.Data.IDbDataParameter: Added Interface to IDataParameter.
|
||||
* System.Data.IDbTransaction: Added Interface to IDisposable.
|
||||
* System.Data.IDbCommand: Fixed Capitalization of class name.
|
||||
* System.Data.IDbConnection: Fixed Capitalization of class name.
|
||||
|
||||
2002-04-15 Rodrigo Moya <[email protected]>
|
||||
|
||||
* System.Data.Common/DbDataPermissionAttribute.cs:
|
||||
* System.Data.Common/DataAdapter.cs:
|
||||
* System.Data.Common/DataColumnMapping.cs:
|
||||
* System.Data.Common/DbDataPermission.cs: added some implementation.
|
||||
|
||||
2002-04-15 Rodrigo Moya <[email protected]>
|
||||
|
||||
* System.Data.SqlClient/SqlConnection.cs: fixed constructor chaining
|
||||
syntax, as pointed out by Levent Camlibel.
|
||||
|
||||
2002-04-14 Rodrigo Moya <[email protected]>
|
||||
|
||||
* System.Data.SqlTypes/SqlBinary.cs:
|
||||
* System.Data.SqlTypes/INullable.cs: new skeletons.
|
||||
|
||||
2002-04-14 Daniel Morgan <[email protected]>
|
||||
|
||||
* System.Data.SqlClient/PostgresLibrary.cs: new internal class, which
|
||||
contains all calls the the PostgreSQL client library, to be used
|
||||
everywhere in System.Data.SqlClient.
|
||||
|
||||
2002-03-30 Rodrigo Moya <[email protected]>
|
||||
|
||||
* System.Data.SqlClient/SqlConnection.cs: implemented basic
|
||||
constructors.
|
||||
|
||||
* System.Data.SqlTypes/SqlNullValueException.cs: new skeletons.
|
||||
|
||||
2002-03-29 Rodrigo Moya <[email protected]>
|
||||
|
||||
* System.Data.Common/DbDataRecord.cs:
|
||||
* System.Data.Common/DbEnumerator.cs:
|
||||
* System.Data.Common/RowUpdatedEventArgs.cs:
|
||||
* System.Data.Common/RowUpdatingEventArgs.cs:
|
||||
* System.Data.Common/DbDataPermissionAttribute.cs: new skeletons.
|
||||
|
||||
2002-03-28 Rodrigo Moya <[email protected]>
|
||||
|
||||
* System.Data.Common/DataTableMappingCollection.cs:
|
||||
* System.Data.Common/DbDataAdapter.cs:
|
||||
* System.Data.Common/DbDataPermission.cs:
|
||||
* System.Data.Common/DataTableMapping.cs: new skeletons.
|
||||
|
||||
* System.Data.SqlClient/SqlDataAdapter.cs:
|
||||
* System.Data.SqlClient/SqlDataReader.cs:
|
||||
* System.Data.SqlClient/SqlErrors.cs:
|
||||
* System.Data.SqlClient/SqlError.cs:
|
||||
* System.Data.SqlClient/SqlException.cs:
|
||||
* System.Data.SqlClient/SqlParameter.cs:
|
||||
* System.Data.SqlClient/SqlParameterCollection.cs:
|
||||
* System.Data.SqlClient/SqlTransaction.cs:
|
||||
* System.Data.SqlClient/SqlCommand.cs: fixed skeletons.
|
||||
|
||||
2002-03-27 Rodrigo Moya <[email protected]>
|
||||
|
||||
* System.Data.Common/DataColumnMapping.cs:
|
||||
* System.Data.Common/DataColumnMappingCollection.cs:
|
||||
* System.Data.Common/DataAdapter.cs: created skeletons.
|
||||
|
||||
* System.Data.build: exclude new directories from build.
|
||||
|
||||
2002-03-27 Rodrigo Moya <[email protected]>
|
||||
|
||||
* System.Data.SqlClient/SqlTransaction.cs: started implementation.
|
||||
|
||||
* System.Data.SqlClient/SqlConnection.cs (BeginTransaction):
|
||||
implemented (2 methods).
|
||||
|
||||
2002-03-24 Duncan Mak <[email protected]>
|
||||
|
||||
* System.Data.build: Excluded System.Data.SqlClient from the build.
|
||||
@@ -10,15 +305,9 @@
|
||||
* System.Data.SqlClient/*: added skeletons for the SQL managed
|
||||
provider for ADO.Net, to be based initially in PostgreSQL.
|
||||
|
||||
2002-02-10 Christopher Podurgiel <[email protected]>
|
||||
2002-03-15 Christopher Podurgiel <[email protected]>
|
||||
|
||||
* Removed *.cs from System.Data as the correct files are in mcs/class/System.Data/System.Data
|
||||
* Updated all Enums, Interfaces, and Delegates in System.Data
|
||||
|
||||
2002-02-11 Christopher Podurgiel <[email protected]>
|
||||
|
||||
* DataColumnChangeEventArgs.cs : Added
|
||||
* DataColumnCollection.cs : Added
|
||||
Changed the Namespace on some Enums from mono.System.Data to System.Data
|
||||
|
||||
2002-03-01 Christopher Podurgiel <[email protected]>
|
||||
|
||||
@@ -29,6 +318,13 @@
|
||||
* DataRelationCollection.cs : Added
|
||||
* DataTableRelationCollection.cs : Added
|
||||
* DataColumn : Added
|
||||
2002-03-15 Christopher Podurgiel <[email protected]>
|
||||
|
||||
2002-02-11 Christopher Podurgiel <[email protected]>
|
||||
|
||||
* DataColumnChangeEventArgs.cs : Added
|
||||
* DataColumnCollection.cs : Added
|
||||
|
||||
2002-02-10 Christopher Podurgiel <[email protected]>
|
||||
|
||||
Changed the Namespace on some Enums from mono.System.Data to System.Data
|
||||
* Removed *.cs from System.Data as the correct files are in mcs/class/System.Data/System.Data
|
||||
* Updated all Enums, Interfaces, and Delegates in System.Data
|
||||
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// System.Data.Common.DataAdapter
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a set of data commands and a database connection that are used to fill the DataSet and update the data source.
|
||||
/// </summary>
|
||||
public abstract class DataAdapter : Component, IDataAdapter
|
||||
{
|
||||
private bool acceptChangesDuringFill;
|
||||
private bool continueUpdateOnError;
|
||||
private MissingMappingAction missingMappingAction;
|
||||
private MissingSchemaAction missingSchemaAction;
|
||||
private DataTableMappingCollection tableMappings;
|
||||
|
||||
protected DataAdapter () {
|
||||
acceptChangesDuringFill = false;
|
||||
continueUpdateOnError = false;
|
||||
missingMappingAction = MissingMappingAction.Error;
|
||||
missingSchemaAction = MissingSchemaAction.Error;
|
||||
tableMappings = null;
|
||||
}
|
||||
|
||||
public abstract int Fill (DataSet dataSet);
|
||||
|
||||
public abstract DataTable[] FillSchema (DataSet dataSet,
|
||||
SchemaType schemaType);
|
||||
|
||||
public abstract IDataParameter[] GetFillParameters ();
|
||||
|
||||
public abstract int Update (DataSet dataSet);
|
||||
|
||||
protected virtual DataAdapter CloneInternals () {
|
||||
}
|
||||
|
||||
protected virtual DataTableMappingCollection CreateTableMappings () {
|
||||
}
|
||||
|
||||
protected virtual bool ShouldSerializeTableMappings () {
|
||||
}
|
||||
|
||||
public bool AcceptChangesDuringFill {
|
||||
get {
|
||||
return acceptChangesDuringFill;
|
||||
}
|
||||
set {
|
||||
acceptChangesDuringFill = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ContinueUpdateOnError {
|
||||
get {
|
||||
return continueUpdateOnError;
|
||||
}
|
||||
set {
|
||||
continueUpdateOnError = value;
|
||||
}
|
||||
}
|
||||
|
||||
public MissingMappingAction MissingMappingAction {
|
||||
get {
|
||||
return missingMappingAction;
|
||||
}
|
||||
set {
|
||||
missingMappingAction = value;
|
||||
}
|
||||
}
|
||||
|
||||
public MissingSchemaAction MissingSchemaAction {
|
||||
get {
|
||||
return missingSchemaAction;
|
||||
}
|
||||
set {
|
||||
missingSchemaAction = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DataTableMappingCollection TableMappings {
|
||||
get {
|
||||
if (tableMappings == null)
|
||||
tableMappings = CreateTableMappings ();
|
||||
return tableMappings;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// System.Data.Common.DataColumnMapping
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains a generic column mapping for an object that inherits from DataAdapter. This class cannot be inherited.
|
||||
/// </summary>
|
||||
public sealed class DataColumnMapping : MarshalByRefObject, IColumnMapping, ICloneable
|
||||
{
|
||||
private string srcColumn;
|
||||
private string dsColumn;
|
||||
|
||||
public DataColumnMapping () {
|
||||
srcColumn = null;
|
||||
dsColumn = null;
|
||||
}
|
||||
|
||||
public DataColumnMapping(string sc, string dc) {
|
||||
srcColumn = sc;
|
||||
dsColumn = dc;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataColumn GetDataColumnBySchemaAction (
|
||||
DataTable dataTable,
|
||||
Type dataType,
|
||||
MissingSchemaAction schemaAction) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public string DataSetColumn {
|
||||
get {
|
||||
return this.dsColumn;
|
||||
}
|
||||
set {
|
||||
this.dsColumn = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string SourceColumn {
|
||||
get {
|
||||
return this.srcColumn;
|
||||
}
|
||||
set {
|
||||
this.srcColumn = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
//
|
||||
// System.Data.Common.DataColumnCollection
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains a collection of DataColumnMapping objects. This class cannot be inherited.
|
||||
/// </summary>
|
||||
public sealed class DataColumnMappingCollection :
|
||||
MarshalByRefObject, IColumnMappingCollection, IList,
|
||||
ICollection, IEnumerable
|
||||
{
|
||||
private DataColumnMapping[] mappings = null;
|
||||
private int size = 0;
|
||||
|
||||
public DataColumnMappingCollection () {
|
||||
}
|
||||
|
||||
public int Add (object obj) {
|
||||
DataColumnMapping[] tmp = new DataColumnMapping[size + 1];
|
||||
|
||||
Array.Copy (mappings, tmp, size);
|
||||
size++;
|
||||
mappings = tmp;
|
||||
mappings[size - 1] = obj;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
public void AddRange (DataColumnMapping[] values) {
|
||||
DataColumnMapping[] tmp = new DataColumnMapping[size + values.Length];
|
||||
|
||||
Array.Copy (mappings, tmp, size);
|
||||
for (int i = 0; i < values.Length; i++) {
|
||||
tmp[i + size] = values[i];
|
||||
}
|
||||
|
||||
size += values.Length;
|
||||
mappings = tmp;
|
||||
}
|
||||
|
||||
public void Clear () {
|
||||
/* FIXME */
|
||||
for (int i = 0; i < size; i++)
|
||||
mappings[i] = null;
|
||||
|
||||
size = 0;
|
||||
}
|
||||
|
||||
public bool Contains (object obj) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (obj.Equals (mappings[i]))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void CopyTo (Array array, int index) {
|
||||
DataColumnMapping[] tmp = new DataColumnMapping[size];
|
||||
Array.Copy (mappings, tmp, size);
|
||||
}
|
||||
|
||||
public DataColumnMapping GetByDataSetColumn (string value) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (mappings[i].DataSetColumn == value)
|
||||
return mappings[i];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static DataColumnMapping GetColumnMappingBySchemaAction (
|
||||
DataColumnMappingCollection columnMappings,
|
||||
string sourceColumn,
|
||||
MissingMappingAction mappingAction) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public int IndexOf (object obj) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (obj.Equals (mappings[i]))
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int IndexOfDataSetColumn (string value) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (mappings[i].DataSetColumn == value)
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Insert (int index, object value) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Remove (object value) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void RemoveAt (int index) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public int Count {
|
||||
get { return size; }
|
||||
}
|
||||
|
||||
public DataColumnMapping this[int index] {
|
||||
get {
|
||||
if (value < size)
|
||||
return mappings[index];
|
||||
return null;
|
||||
}
|
||||
set {
|
||||
if (value < size)
|
||||
mappings[index] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// System.Data.Common.DataTableMapping.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains a description of a mapped relationship between a source table and a DataTable. This class is used by a DataAdapter when populating a DataSet.
|
||||
/// </summary>
|
||||
public sealed class DataTableMapping : MarshalByRefObject, ITableMapping, ICloneable
|
||||
{
|
||||
[MonoTODO]
|
||||
public DataTableMapping() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTableMapping (string a, string b) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTableMapping(string a, string b, DataColumnMapping[] c) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataColumnMapping GetColumnMappingBySchemaAction(
|
||||
string sourceColumn,
|
||||
MissingMappingAction mappingAction) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTable GetDataTableBySchemaAction(
|
||||
DataSet dataSet,
|
||||
MissingSchemaAction schemaAction) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataColumnMappingCollection ColumnMappings {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string DataSetTable {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string SourceTable {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
//
|
||||
// System.Data.Common.DataTableMappingCollection.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// A collection of DataTableMapping objects. This class cannot be inherited.
|
||||
/// </summary>
|
||||
public sealed class DataTableMappingCollection :
|
||||
MarshalByRefObject, ITableMappingCollection, IList,
|
||||
ICollection, IEnumerable
|
||||
{
|
||||
[MonoTODO]
|
||||
public DataTableMappingCollection() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Add (object obj) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTableMapping Add (string a, string b) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void AddRange(DataTableMapping[] values) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Clear() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool Contains (object obj) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool Contains (string str) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void CopyTo(Array array, int index) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTableMapping GetByDataSetTable(string dataSetTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static DataTableMapping GetTableMappingBySchemaAction(
|
||||
DataTableMappingCollection tableMappings,
|
||||
string sourceTable,
|
||||
string dataSetTable,
|
||||
MissingMappingAction mappingAction) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int IndexOf (object obj) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int IndexOf (string str) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int IndexOfDataSetTable (string dataSetTable) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Insert (int index, object value) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Remove (object value) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void RemoveAt (int index) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void RemoveAt (string index) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Count {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTableMapping this[int i] {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTableMapping this[string s] {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
//
|
||||
// System.Data.Common.DbDataAdapter.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Aids implementation of the IDbDataAdapter interface. Inheritors of DbDataAdapter implement a set of functions to provide strong typing, but inherit most of the functionality needed to fully implement a DataAdapter.
|
||||
/// </summary>
|
||||
public abstract class DbDataAdapter : DataAdapter, ICloneable
|
||||
{
|
||||
public const string DefaultSourceTableName = "default";
|
||||
|
||||
[MonoTODO]
|
||||
protected DbDataAdapter() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override int Fill (DataSet ds) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Fill (DataTable dt) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Fill (DataSet ds, string s) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Fill (DataTable dt, IDataReader idr) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Fill (DataTable dt,
|
||||
IDbCommand idc,
|
||||
CommandBehavior behavior) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Fill (DataSet ds, int i, int j, string s) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Fill (DataSet ds,
|
||||
string s,
|
||||
IDataReader idr,
|
||||
int i,
|
||||
int j) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Fill (DataSet ds,
|
||||
int i,
|
||||
int j,
|
||||
string s,
|
||||
IDbCommand idc,
|
||||
CommandBehavior behavior) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override DataTable[] FillSchema (DataSet ds, SchemaType type) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTable FillSchema (DataTable dt, SchemaType type) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTable[] FillSchema (DataSet ds, SchemaType type, string s) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual DataTable FillSchema (DataTable dt,
|
||||
SchemaType type,
|
||||
IDbCommand idc,
|
||||
CommandBehavior behavior) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual DataTable[] FillSchema (DataSet ds,
|
||||
SchemaType type,
|
||||
IDbCommand idc,
|
||||
string s,
|
||||
CommandBehavior behavior) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IDataParameter[] GetFillParameters() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Update (DataRow[] row) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override int Update (DataSet ds) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Update (DataTable dt) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual int Update (DataRow[] row, DataTableMapping dtm) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int Update (DataSet ds, string s) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
protected abstract RowUpdatedEventArgs CreateRowUpdatedEvent(
|
||||
DataRow dataRow,
|
||||
IDbCommand command,
|
||||
StatementType statementType,
|
||||
DataTableMapping tableMapping);
|
||||
|
||||
protected abstract RowUpdatingEventArgs CreateRowUpdatingEvent(
|
||||
DataRow dataRow,
|
||||
IDbCommand command,
|
||||
StatementType statementType,
|
||||
DataTableMapping tableMapping);
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual void OnFillError(FillErrorEventArgs value) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
protected abstract void OnRowUpdated(RowUpdatedEventArgs value);
|
||||
|
||||
protected abstract void OnRowUpdating(RowUpdatingEventArgs value);
|
||||
|
||||
public event FillErrorEventHandler FillError;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// System.Data.Common.DbDataAdapter.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides the capability for a .NET data provider to ensure that a user has a security level adequate for accessing data.
|
||||
/// </summary>
|
||||
public abstract class DBDataPermission : CodeAccessPermission,
|
||||
IUnrestrictedPermission
|
||||
{
|
||||
private bool allowBlankPassword;
|
||||
private PermissionState permissionState;
|
||||
|
||||
protected DBDataPermission () {
|
||||
allowBlankPassword = false;
|
||||
permissionState = PermissionState.None;
|
||||
}
|
||||
|
||||
protected DBDataPermission (PermissionState state) {
|
||||
allowBlankPassword = false;
|
||||
permissionState = state;
|
||||
}
|
||||
|
||||
public DBDataPermission (PermissionState state, bool abp) {
|
||||
allowBlankPassword = abp;
|
||||
permissionState = state;
|
||||
}
|
||||
|
||||
public override IPermission Copy () {
|
||||
DbDataPermission copy = new DbDataPermission (
|
||||
permissionState, allowBlankPassword);
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override void FromXml (SecurityElement securityElement) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IPermission Intersect (IPermission target) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override bool IsSubsetOf (IPermission target) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool IsUnrestricted () {
|
||||
if (permissionState == PermissionState.Unrestricted)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override SecurityElement ToXml () {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IPermission Union (IPermission target) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool AllowBlankPassword {
|
||||
get {
|
||||
return allowBlankPassword;
|
||||
}
|
||||
set {
|
||||
allowBlankPassword = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// System.Data.Common.DbDataPermissionAttribute.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
|
||||
using System.Security.Permissions;
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Associates a security action with a custom security attribute.
|
||||
/// </summary>
|
||||
public abstract class DBDataPermissionAttribute : CodeAccessSecurityAttribute
|
||||
{
|
||||
private SecurityAction securityAction;
|
||||
private bool allowBlankPassword;
|
||||
|
||||
protected DBDataPermissionAttribute (SecurityAction action) {
|
||||
securityAction = action;
|
||||
allowBlankPassword = false;
|
||||
}
|
||||
|
||||
public bool AllowBlankPassword {
|
||||
get {
|
||||
return allowBlankPassword;
|
||||
}
|
||||
set {
|
||||
allowBlankPassword = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// System.Data.Common.RowUpdatedEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
|
||||
using System.Data;
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides data for the RowUpdated event of a .NET data provider.
|
||||
/// </summary>
|
||||
public abstract class RowUpdatedEventArgs : EventArgs
|
||||
{
|
||||
[MonoTODO]
|
||||
protected RowUpdatedEventArgs(DataRow dataRow,
|
||||
IDbCommand command,
|
||||
StatementType statementType,
|
||||
DataTableMapping tableMapping) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public IDbCommand Command {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public Exception Errors {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public int RecordsAffected {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataRow Row {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public StatementType StatementType {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public UpdateStatus Status {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTableMapping TableMapping {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// System.Data.Common.RowUpdatingEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc
|
||||
//
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides the data for the RowUpdating event of a .NET data provider.
|
||||
/// </summary>
|
||||
public abstract class RowUpdatingEventArgs : EventArgs
|
||||
{
|
||||
[MonoTODO]
|
||||
protected RowUpdatingEventArgs(DataRow dataRow,
|
||||
IDbCommand command,
|
||||
StatementType statementType,
|
||||
DataTableMapping tableMapping) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public IDbCommand Command {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public Exception Errors {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataRow Row {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public StatementType StatementType {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public UpdateStatus Status {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public DataTableMapping TableMapping {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,471 @@
|
||||
//
|
||||
// System.Data.SqlClient.PostgresLibrary.cs
|
||||
//
|
||||
// PInvoke methods to libpq
|
||||
// which is PostgreSQL client library
|
||||
//
|
||||
// May also contain enumerations,
|
||||
// data types, or wrapper methods.
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
/* IMPORTANT: DO NOT CHANGE ANY OF THESE ENUMS */
|
||||
|
||||
internal enum ConnStatusType
|
||||
{
|
||||
CONNECTION_OK,
|
||||
CONNECTION_BAD,
|
||||
CONNECTION_STARTED,
|
||||
CONNECTION_MADE,
|
||||
CONNECTION_AWAITING_RESPONSE,
|
||||
CONNECTION_AUTH_OK,
|
||||
CONNECTION_SETENV
|
||||
}
|
||||
|
||||
internal enum PostgresPollingStatusType
|
||||
{
|
||||
PGRES_POLLING_FAILED = 0,
|
||||
PGRES_POLLING_READING,
|
||||
PGRES_POLLING_WRITING,
|
||||
PGRES_POLLING_OK,
|
||||
PGRES_POLLING_ACTIVE
|
||||
}
|
||||
|
||||
internal enum ExecStatusType
|
||||
{
|
||||
PGRES_EMPTY_QUERY = 0,
|
||||
PGRES_COMMAND_OK,
|
||||
PGRES_TUPLES_OK,
|
||||
PGRES_COPY_OUT,
|
||||
PGRES_COPY_IN,
|
||||
PGRES_BAD_RESPONSE,
|
||||
PGRES_NONFATAL_ERROR,
|
||||
PGRES_FATAL_ERROR
|
||||
}
|
||||
|
||||
sealed internal class PostgresLibrary
|
||||
{
|
||||
#region PInvoke Functions
|
||||
|
||||
// pinvoke prototypes to PostgreSQL client library
|
||||
// pq.dll on windows and libpq.so on linux
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQconnectStart (string conninfo);
|
||||
// PGconn *PQconnectStart(const char *conninfo);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern PostgresPollingStatusType PQconnectPoll (IntPtr conn);
|
||||
// PostgresPollingStatusType PQconnectPoll(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQconnectdb (string conninfo);
|
||||
// PGconn *PQconnectdb(const char *conninfo);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQsetdbLogin (string pghost,
|
||||
string pgport, string pgoptions,
|
||||
string pgtty, string dbName,
|
||||
string login, string pwd);
|
||||
// PGconn *PQsetdbLogin(const char *pghost,
|
||||
// const char *pgport, const char *pgoptions,
|
||||
// const char *pgtty, const char *dbName,
|
||||
// const char *login, const char *pwd);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQfinish (IntPtr conn);
|
||||
// void PQfinish(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQconndefaults ();
|
||||
// PQconninfoOption *PQconndefaults(void);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQconninfoFree (IntPtr connOptions);
|
||||
// void PQconninfoFree(PQconninfoOption *connOptions);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQresetStart (IntPtr conn);
|
||||
// int PQresetStart(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQresetPoll (IntPtr conn);
|
||||
// PostgresPollingStatusType PQresetPoll(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQreset (IntPtr conn);
|
||||
// void PQreset(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQrequestCancel (IntPtr conn);
|
||||
// int PQrequestCancel(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQdb (IntPtr conn);
|
||||
// char *PQdb(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQuser (IntPtr conn);
|
||||
// char *PQuser(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQpass (IntPtr conn);
|
||||
// char *PQpass(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQhost (IntPtr conn);
|
||||
// char *PQhost(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQport (IntPtr conn);
|
||||
// char *PQport(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQtty (IntPtr conn);
|
||||
// char *PQtty(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQoptions (IntPtr conn);
|
||||
// char *PQoptions(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern ConnStatusType PQstatus (IntPtr conn);
|
||||
// ConnStatusType PQstatus(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQerrorMessage (IntPtr conn);
|
||||
// char *PQerrorMessage(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQsocket (IntPtr conn);
|
||||
// int PQsocket(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQbackendPID (IntPtr conn);
|
||||
// int PQbackendPID(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQclientEncoding (IntPtr conn);
|
||||
// int PQclientEncoding(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQsetClientEncoding (IntPtr conn,
|
||||
string encoding);
|
||||
// int PQsetClientEncoding(PGconn *conn,
|
||||
// const char *encoding);
|
||||
|
||||
//FIXME: when loading, causes runtime exception
|
||||
//[DllImport("pq")]
|
||||
//public static extern IntPtr PQgetssl (IntPtr conn);
|
||||
// SSL *PQgetssl(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQtrace (IntPtr conn,
|
||||
IntPtr debug_port);
|
||||
// void PQtrace(PGconn *conn,
|
||||
// FILE *debug_port);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQuntrace (IntPtr conn);
|
||||
// void PQuntrace(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQsetNoticeProcessor (IntPtr conn,
|
||||
IntPtr proc, IntPtr arg);
|
||||
// PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
|
||||
// PQnoticeProcessor proc, void *arg);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQescapeString (string to,
|
||||
string from, int length);
|
||||
// size_t PQescapeString(char *to,
|
||||
// const char *from, size_t length);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQescapeBytea (string bintext,
|
||||
int binlen, IntPtr bytealen);
|
||||
// unsigned char *PQescapeBytea(unsigned char *bintext,
|
||||
// size_t binlen, size_t *bytealen);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQexec (IntPtr conn,
|
||||
string query);
|
||||
// PGresult *PQexec(PGconn *conn,
|
||||
// const char *query);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQnotifies (IntPtr conn);
|
||||
// PGnotify *PQnotifies(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQfreeNotify (IntPtr notify);
|
||||
// void PQfreeNotify(PGnotify *notify);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQsendQuery (IntPtr conn,
|
||||
string query);
|
||||
// int PQsendQuery(PGconn *conn,
|
||||
// const char *query);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQgetResult (IntPtr conn);
|
||||
// PGresult *PQgetResult(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQisBusy (IntPtr conn);
|
||||
// int PQisBusy(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQconsumeInput (IntPtr conn);
|
||||
// int PQconsumeInput(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQgetline (IntPtr conn,
|
||||
string str, int length);
|
||||
// int PQgetline(PGconn *conn,
|
||||
// char *string, int length);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQputline (IntPtr conn,
|
||||
string str);
|
||||
// int PQputline(PGconn *conn,
|
||||
// const char *string);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQgetlineAsync (IntPtr conn,
|
||||
string buffer, int bufsize);
|
||||
// int PQgetlineAsync(PGconn *conn, char *buffer,
|
||||
// int bufsize);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQputnbytes (IntPtr conn,
|
||||
string buffer, int nbytes);
|
||||
// int PQputnbytes(PGconn *conn,
|
||||
//const char *buffer, int nbytes);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQendcopy (IntPtr conn);
|
||||
// int PQendcopy(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQsetnonblocking (IntPtr conn,
|
||||
int arg);
|
||||
// int PQsetnonblocking(PGconn *conn, int arg);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQisnonblocking (IntPtr conn);
|
||||
// int PQisnonblocking(const PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQflush (IntPtr conn);
|
||||
// int PQflush(PGconn *conn);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQfn (IntPtr conn, int fnid,
|
||||
IntPtr result_buf, IntPtr result_len,
|
||||
int result_is_int, IntPtr args,
|
||||
int nargs);
|
||||
// PGresult *PQfn(PGconn *conn, int fnid,
|
||||
// int *result_buf, int *result_len,
|
||||
// int result_is_int, const PQArgBlock *args,
|
||||
// int nargs);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern ExecStatusType PQresultStatus (IntPtr res);
|
||||
// ExecStatusType PQresultStatus(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQresStatus (ExecStatusType status);
|
||||
// char *PQresStatus(ExecStatusType status);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQresultErrorMessage (IntPtr res);
|
||||
// char *PQresultErrorMessage(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQntuples (IntPtr res);
|
||||
// int PQntuples(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQnfields (IntPtr res);
|
||||
// int PQnfields(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQbinaryTuples (IntPtr res);
|
||||
// int PQbinaryTuples(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQfname (IntPtr res,
|
||||
int field_num);
|
||||
// char *PQfname(const PGresult *res,
|
||||
// int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQfnumber (IntPtr res,
|
||||
string field_name);
|
||||
// int PQfnumber(const PGresult *res,
|
||||
// const char *field_name);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQftype (IntPtr res,
|
||||
int field_num);
|
||||
// Oid PQftype(const PGresult *res,
|
||||
// int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQfsize (IntPtr res,
|
||||
int field_num);
|
||||
// int PQfsize(const PGresult *res,
|
||||
// int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQfmod (IntPtr res, int field_num);
|
||||
// int PQfmod(const PGresult *res, int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQcmdStatus (IntPtr res);
|
||||
// char *PQcmdStatus(PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQoidStatus (IntPtr res);
|
||||
// char *PQoidStatus(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQoidValue (IntPtr res);
|
||||
// Oid PQoidValue(const PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQcmdTuples (IntPtr res);
|
||||
// char *PQcmdTuples(PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern string PQgetvalue (IntPtr res,
|
||||
int tup_num, int field_num);
|
||||
// char *PQgetvalue(const PGresult *res,
|
||||
// int tup_num, int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQgetlength (IntPtr res,
|
||||
int tup_num, int field_num);
|
||||
// int PQgetlength(const PGresult *res,
|
||||
// int tup_num, int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQgetisnull (IntPtr res,
|
||||
int tup_num, int field_num);
|
||||
// int PQgetisnull(const PGresult *res,
|
||||
// int tup_num, int field_num);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQclear (IntPtr res);
|
||||
// void PQclear(PGresult *res);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern IntPtr PQmakeEmptyPGresult (IntPtr conn,
|
||||
IntPtr status);
|
||||
// PGresult *PQmakeEmptyPGresult(PGconn *conn,
|
||||
// ExecStatusType status);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQprint (IntPtr fout,
|
||||
IntPtr res, IntPtr ps);
|
||||
// void PQprint(FILE *fout,
|
||||
// const PGresult *res, const PQprintOpt *ps);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQdisplayTuples (IntPtr res,
|
||||
IntPtr fp, int fillAlign, string fieldSep,
|
||||
int printHeader, int quiet);
|
||||
// void PQdisplayTuples(const PGresult *res,
|
||||
// FILE *fp, int fillAlign, const char *fieldSep,
|
||||
// int printHeader, int quiet);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern void PQprintTuples (IntPtr res,
|
||||
IntPtr fout, int printAttName, int terseOutput,
|
||||
int width);
|
||||
// void PQprintTuples(const PGresult *res,
|
||||
// FILE *fout, int printAttName, int terseOutput,
|
||||
// int width);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_open (IntPtr conn,
|
||||
int lobjId, int mode);
|
||||
// int lo_open(PGconn *conn,
|
||||
// Oid lobjId, int mode);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_close (IntPtr conn, int fd);
|
||||
// int lo_close(PGconn *conn, int fd);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_read (IntPtr conn,
|
||||
int fd, string buf, int len);
|
||||
// int lo_read(PGconn *conn,
|
||||
// int fd, char *buf, size_t len);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_write (IntPtr conn,
|
||||
int fd, string buf, int len);
|
||||
// int lo_write(PGconn *conn,
|
||||
// int fd, char *buf, size_t len);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_lseek (IntPtr conn,
|
||||
int fd, int offset, int whence);
|
||||
// int lo_lseek(PGconn *conn,
|
||||
// int fd, int offset, int whence);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_creat (IntPtr conn,
|
||||
int mode);
|
||||
// Oid lo_creat(PGconn *conn,
|
||||
// int mode);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_tell (IntPtr conn, int fd);
|
||||
// int lo_tell(PGconn *conn, int fd);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_unlink (IntPtr conn,
|
||||
int lobjId);
|
||||
// int lo_unlink(PGconn *conn,
|
||||
// Oid lobjId);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_import (IntPtr conn,
|
||||
string filename);
|
||||
// Oid lo_import(PGconn *conn,
|
||||
// const char *filename);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int lo_export (IntPtr conn,
|
||||
int lobjId, string filename);
|
||||
// int lo_export(PGconn *conn,
|
||||
// Oid lobjId, const char *filename);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQmblen (string s,
|
||||
int encoding);
|
||||
// int PQmblen(const unsigned char *s,
|
||||
// int encoding);
|
||||
|
||||
[DllImport("pq")]
|
||||
public static extern int PQenv2encoding ();
|
||||
// int PQenv2encoding(void);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlClientPermission.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient {
|
||||
|
||||
public sealed class SqlClientPermission : DBDataPermission {
|
||||
|
||||
[MonoTODO]
|
||||
public SqlClientPermission() {
|
||||
// FIXME: do constructor
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlClientPermission(PermissionState state) {
|
||||
// FIXME: do constructor
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SqlClientPermission(PermissionState state,
|
||||
bool allowBlankPassword) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IPermission Copy() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override void FromXml(SecurityElement
|
||||
securityElement) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IPermission Intersect(IPermission target) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override bool IsSubsetOf(IPermission target) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override string ToString() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override SecurityElement ToXml() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override IPermission Union(IPermission target) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlClientPermission() {
|
||||
// FIXME: destructor to release resources
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// System.Data.SqlClient.SqlClientPermissionAttribute.cs
|
||||
//
|
||||
// Author:
|
||||
// Rodrigo Moya ([email protected])
|
||||
// Daniel Morgan ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc 2002
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient {
|
||||
|
||||
[AttributeUsage(AttributeTargets.Assembly |
|
||||
AttributeTargets.Class |
|
||||
AttributeTargets.Struct |
|
||||
AttributeTargets.Constructor |
|
||||
AttributeTargets.Method)]
|
||||
[Serializable]
|
||||
public sealed class SqlClientPermissionAttribute :
|
||||
DBDataPermissionAttribute {
|
||||
|
||||
[MonoTODO]
|
||||
[AttributeUsage(AttributeTargets.Assembly |
|
||||
AttributeTargets.Class |
|
||||
AttributeTargets.Struct |
|
||||
AttributeTargets.Constructor |
|
||||
AttributeTargets.Method)]
|
||||
[Serializable]
|
||||
public SqlClientPermissionAttribute(SecurityAction action) {
|
||||
// FIXME: do constructor
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class
|
||||
| AttributeTargets.Struct | AttributeTargets.Constructor |
|
||||
AttributeTargets.Method)]
|
||||
[Serializable]
|
||||
public override IPermission CreatePermission() {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
~SqlClientPermissionAttribute() {
|
||||
// FIXME: destructor to release resources
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loaded 100 of 2257 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user