mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-03 00:00:58 +08:00
Compare commits
864 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
add3437bcf | ||
|
|
e8f957f344 | ||
|
|
74d43ca974 | ||
|
|
9af98089f2 | ||
|
|
b619204c5e | ||
|
|
27051aa01d | ||
|
|
23ffd23694 | ||
|
|
96b9cad2f8 | ||
|
|
35ebce6a85 | ||
|
|
9530350d06 | ||
|
|
c122863e45 | ||
|
|
b4de38fbb9 | ||
|
|
6095f2174f | ||
|
|
b4751ea87a | ||
|
|
d46d6a58ab | ||
|
|
dee6ea1663 | ||
|
|
74988a80bf | ||
|
|
24b011ef93 | ||
|
|
1c7486a7bc | ||
|
|
b30e2f0cc0 | ||
|
|
07d82e508e | ||
|
|
29f9cb6b4a | ||
|
|
b4e29d4776 | ||
|
|
a4aff25008 | ||
|
|
940dbca248 | ||
|
|
4097244d5b | ||
|
|
bb6e9b9e3f | ||
|
|
1d1f43afe3 | ||
|
|
5a4d00a788 | ||
|
|
578d410b77 | ||
|
|
84b11ae6a8 | ||
|
|
923972c543 | ||
|
|
62708830b1 | ||
|
|
a55b633d84 | ||
|
|
634c88e337 | ||
|
|
afa27a3f53 | ||
|
|
277126e9df | ||
|
|
c72fb7c05e | ||
|
|
396d4b456b | ||
|
|
594708c18f | ||
|
|
8159f90cc8 | ||
|
|
2eaa5f5bb6 | ||
|
|
8b890a9271 | ||
|
|
df1a4d7149 | ||
|
|
12c181a5aa | ||
|
|
480606eaf5 | ||
|
|
54f125a2f5 | ||
|
|
e04edf4a4e | ||
|
|
0a54ba9cae | ||
|
|
a074cdefa5 | ||
|
|
0382d4f114 | ||
|
|
60ab339d79 | ||
|
|
26a52ee451 | ||
|
|
79bd539a02 | ||
|
|
047000fb1d | ||
|
|
616e06d262 | ||
|
|
d9e91bcbf5 | ||
|
|
a0478279df | ||
|
|
58d1b62250 | ||
|
|
27c76a62f1 | ||
|
|
7f7640d326 | ||
|
|
d0412af18f | ||
|
|
1e577527b3 | ||
|
|
38bfc87fc1 | ||
|
|
1c09722d4f | ||
|
|
38e936fa35 | ||
|
|
d034063bab | ||
|
|
ebbe4465b3 | ||
|
|
38c39d4cb9 | ||
|
|
8bf01451a8 | ||
|
|
1b180ed60c | ||
|
|
0aa532ffa4 | ||
|
|
e5d6d319fd | ||
|
|
b49ae9c034 | ||
|
|
996401eb62 | ||
|
|
426c67631a | ||
|
|
7fa4a5f363 | ||
|
|
1843b9c44f | ||
|
|
fcea4c63a7 | ||
|
|
d5eead48cf | ||
|
|
389ce08dad | ||
|
|
7946894d33 | ||
|
|
7955a9747b | ||
|
|
ca200c81b3 | ||
|
|
b30662d2b4 | ||
|
|
1c84757d1d | ||
|
|
5db4fea3b5 | ||
|
|
3bcc8d3eba | ||
|
|
cc9a015111 | ||
|
|
08de00f640 | ||
|
|
1c5be59105 | ||
|
|
5b109e91d1 | ||
|
|
14db420cbe | ||
|
|
db08e993df | ||
|
|
26dbc8d00d | ||
|
|
a903b5e36c | ||
|
|
0789ebf9a9 | ||
|
|
198ce36fea | ||
|
|
40a89c9374 | ||
|
|
f267d820bf | ||
|
|
f44a099469 | ||
|
|
419b25f38d | ||
|
|
c23ff654ed | ||
|
|
b69267d94f | ||
|
|
1ddcde1684 | ||
|
|
33abda8fb3 | ||
|
|
39a9416427 | ||
|
|
9cc5d76888 | ||
|
|
19983283f2 | ||
|
|
75ac150908 | ||
|
|
66a7cba068 | ||
|
|
d71cea6fea | ||
|
|
27dbdad9b2 | ||
|
|
863507ade1 | ||
|
|
4660ae212c | ||
|
|
44114c0d19 | ||
|
|
565cd3da5c | ||
|
|
c55711c1eb | ||
|
|
5df066999b | ||
|
|
d9c9db332c | ||
|
|
bca3ce1e5f | ||
|
|
6121e62cc9 | ||
|
|
cbc34ade78 | ||
|
|
daaa3513ae | ||
|
|
0d6b62c8e7 | ||
|
|
a2d9326826 | ||
|
|
c847af3df1 | ||
|
|
ef220a5b36 | ||
|
|
695989969d | ||
|
|
3429de9eb6 | ||
|
|
f2e3c76539 | ||
|
|
1ca1c280f6 | ||
|
|
d73fdaf7ad | ||
|
|
071c541a4b | ||
|
|
0b8467c0b0 | ||
|
|
41e202fe7b | ||
|
|
269d0c00c5 | ||
|
|
146a7093f7 | ||
|
|
c9127c6d30 | ||
|
|
339c333679 | ||
|
|
a70ea536d4 | ||
|
|
1a62c0154d | ||
|
|
29ee0b5945 | ||
|
|
68e627bb04 | ||
|
|
32aca8c6a8 | ||
|
|
ef22651860 | ||
|
|
547c7d1b6d | ||
|
|
cabdd55cf5 | ||
|
|
d7a4c4f82d | ||
|
|
df5224cf12 | ||
|
|
a6625de5d5 | ||
|
|
515919b048 | ||
|
|
c21d1dd155 | ||
|
|
643b284e27 | ||
|
|
368b4fcfd4 | ||
|
|
1f4f98b513 | ||
|
|
8c343fb01f | ||
|
|
777aa64153 | ||
|
|
ae30d4b2cb | ||
|
|
4c12626b44 | ||
|
|
d389dcbedf | ||
|
|
58ff8f45cf | ||
|
|
826271c84d | ||
|
|
3a158c8249 | ||
|
|
6b14f6fbea | ||
|
|
e92dd48bbf | ||
|
|
250937a099 | ||
|
|
53b594a36a | ||
|
|
ea86ab667f | ||
|
|
8fc686bddf | ||
|
|
f60298a941 | ||
|
|
cb2674ebb6 | ||
|
|
3f92a0ccb4 | ||
|
|
cb7f4db207 | ||
|
|
6bfcccfbb6 | ||
|
|
9ef959ee46 | ||
|
|
c24ef3f6b5 | ||
|
|
86ea2ce863 | ||
|
|
646531393f | ||
|
|
29d4bebdca | ||
|
|
ac69cbc0b4 | ||
|
|
4e83663f90 | ||
|
|
0faa1aecad | ||
|
|
8546c59f52 | ||
|
|
944bd8c956 | ||
|
|
641217085f | ||
|
|
586775c8ff | ||
|
|
3f2f89768b | ||
|
|
1087b0965d | ||
|
|
6aedff75f1 | ||
|
|
43b4032bbb | ||
|
|
b57d56f317 | ||
|
|
6404f1b786 | ||
|
|
47f77a4dee | ||
|
|
4febaa68eb | ||
|
|
f5c83cb770 | ||
|
|
3fc0b1020c | ||
|
|
887ea275f6 | ||
|
|
4d10caecb9 | ||
|
|
3bfe4b6980 | ||
|
|
33bf294f71 | ||
|
|
11443beb22 | ||
|
|
c2c92ab196 | ||
|
|
d752c97aff | ||
|
|
f53a6cf05b | ||
|
|
b6ec8cf6f0 | ||
|
|
38ad893a5c | ||
|
|
dd2475e829 | ||
|
|
f9a3514c1d | ||
|
|
534b03ef5c | ||
|
|
822febba2e | ||
|
|
e989313b0d | ||
|
|
b713793063 | ||
|
|
0327f040e9 | ||
|
|
e4f89e5a05 | ||
|
|
069e411dc4 | ||
|
|
9dc72ef3ee | ||
|
|
61d774817f | ||
|
|
af98ef56a1 | ||
|
|
4bb93a947e | ||
|
|
8857fb24f0 | ||
|
|
21fdb41b09 | ||
|
|
3b3c778a0f | ||
|
|
a63c986c02 | ||
|
|
2279fb3788 | ||
|
|
f0ae259040 | ||
|
|
65f0445001 | ||
|
|
a7a794c709 | ||
|
|
4ce9ee520a | ||
|
|
70a65766c1 | ||
|
|
1ab0263347 | ||
|
|
c0f721d737 | ||
|
|
257197e1f1 | ||
|
|
3f80307154 | ||
|
|
14781da78e | ||
|
|
d4e4a4a8b7 | ||
|
|
aa5d3b9d90 | ||
|
|
48003554b4 | ||
|
|
bcb9f094c9 | ||
|
|
bbcfadbba4 | ||
|
|
0e7c6d6d1c | ||
|
|
eaed0cac8a | ||
|
|
d23492b9a8 | ||
|
|
6697649b97 | ||
|
|
5a2d9125d4 | ||
|
|
0b97823f92 | ||
|
|
f39514a623 | ||
|
|
0a247a9229 | ||
|
|
2fb831075e | ||
|
|
e0f8ac1eea | ||
|
|
8ff472042c | ||
|
|
5f4ee6cc68 | ||
|
|
de48c64bc9 | ||
|
|
01aa699462 | ||
|
|
801b280717 | ||
|
|
96b4bb0ce6 | ||
|
|
11b94f965c | ||
|
|
3532bf54e7 | ||
|
|
a35ab95809 | ||
|
|
36207ee29a | ||
|
|
d7d6986927 | ||
|
|
db81a5358f | ||
|
|
9f4c87c555 | ||
|
|
f77887e6a3 | ||
|
|
1907acd35d | ||
|
|
f7f8bad301 | ||
|
|
d2ae803ecc | ||
|
|
5416ba1048 | ||
|
|
071ca9462a | ||
|
|
02fc86af4f | ||
|
|
2dbfdc67c5 | ||
|
|
609c7c821f | ||
|
|
b239a4ff56 | ||
|
|
7fb5cb72f5 | ||
|
|
798cb92f50 | ||
|
|
9477ca0373 | ||
|
|
efa87e0e1a | ||
|
|
26dd107f48 | ||
|
|
4673398976 | ||
|
|
c72a990162 | ||
|
|
3f1f76b2e8 | ||
|
|
6675376241 | ||
|
|
12ec7a0392 | ||
|
|
1d9b0f771f | ||
|
|
f7ef896f48 | ||
|
|
da1d24bb5c | ||
|
|
e30586d314 | ||
|
|
58fceea247 | ||
|
|
36f72c857d | ||
|
|
39d472bdc8 | ||
|
|
64adfcceab | ||
|
|
419cadfe1d | ||
|
|
44b13acc61 | ||
|
|
13ae0e33c1 | ||
|
|
ff19cb68b9 | ||
|
|
c50f1ffcb4 | ||
|
|
e17ba2889a | ||
|
|
fdb4e46019 | ||
|
|
0be8a69eca | ||
|
|
69a4de8e0e | ||
|
|
fd78b2e3c3 | ||
|
|
6bc9f1c7fd | ||
|
|
861379b678 | ||
|
|
7969a75a19 | ||
|
|
b6d35a88db | ||
|
|
1087b5aebe | ||
|
|
4a626503f7 | ||
|
|
add74b0ad0 | ||
|
|
10823b3c98 | ||
|
|
8e85a233a9 | ||
|
|
19d8912680 | ||
|
|
b5d8d43e72 | ||
|
|
98896f838b | ||
|
|
3fa884f326 | ||
|
|
633f8d66f2 | ||
|
|
6b96231087 | ||
|
|
e614935693 | ||
|
|
6b15aa9c8e | ||
|
|
c9e01e0782 | ||
|
|
c18334002c | ||
|
|
e0fa97f7a2 | ||
|
|
e9b5147743 | ||
|
|
96ae77e5ab | ||
|
|
ba9ac0fa5d | ||
|
|
f43f1e7be1 | ||
|
|
88eba44f68 | ||
|
|
fac6f04943 | ||
|
|
56785f96a9 | ||
|
|
2013aa5db8 | ||
|
|
68c1d59638 | ||
|
|
3412ce64cb | ||
|
|
1c32534ba1 | ||
|
|
e509adfdab | ||
|
|
c42f3c329e | ||
|
|
32ab379003 | ||
|
|
1d777f8704 | ||
|
|
226b4ce722 | ||
|
|
edcf7f52af | ||
|
|
7e895403a9 | ||
|
|
d604e9c3f3 | ||
|
|
6debf25162 | ||
|
|
a81873c148 | ||
|
|
7475a683cc | ||
|
|
666f5a10d3 | ||
|
|
70a7840365 | ||
|
|
98a4a2158a | ||
|
|
0d5c196f39 | ||
|
|
3d5aff3e29 | ||
|
|
d324ddff3f | ||
|
|
72b0135410 | ||
|
|
820400d77f | ||
|
|
ba2fa497b1 | ||
|
|
6bec254d49 | ||
|
|
71aabe9fe4 | ||
|
|
f461a1978e | ||
|
|
bbc5287551 | ||
|
|
71108b6ba8 | ||
|
|
56760a0aac | ||
|
|
a06c8c00b3 | ||
|
|
40195ea993 | ||
|
|
e64b12097a | ||
|
|
cf793c198f | ||
|
|
f1a87ef529 | ||
|
|
4e5f51a4c8 | ||
|
|
36e9938011 | ||
|
|
cf4e5aae47 | ||
|
|
e71936063d | ||
|
|
ae5f63b1ed | ||
|
|
4a0a0e0bb6 | ||
|
|
c80ecf958c | ||
|
|
5a65a2e49f | ||
|
|
3ee8419802 | ||
|
|
90a5a14d30 | ||
|
|
6ae73e6c2b | ||
|
|
e394726eef | ||
|
|
c3f74b8dc2 | ||
|
|
00f4d3eaf3 | ||
|
|
ad55441bf6 | ||
|
|
0287e0481c | ||
|
|
93e4ab88fb | ||
|
|
1267cf9845 | ||
|
|
c588936c7e | ||
|
|
1ca8c80af1 | ||
|
|
08b696fd9b | ||
|
|
ef53885bd2 | ||
|
|
d27dd0e318 | ||
|
|
ada31888f4 | ||
|
|
41455cd47f | ||
|
|
b7903910de | ||
|
|
36af5f06b5 | ||
|
|
6bec250f6c | ||
|
|
ce667a9f9e | ||
|
|
2c8d579668 | ||
|
|
a3f7c1e867 | ||
|
|
3f2b0319fa | ||
|
|
4394039f29 | ||
|
|
2b870358e9 | ||
|
|
fab126ddfd | ||
|
|
ad7c851fdc | ||
|
|
bf8ce2e845 | ||
|
|
d81f09bf28 | ||
|
|
50d381cab9 | ||
|
|
ec38f939d5 | ||
|
|
a66f010af9 | ||
|
|
2325c83455 | ||
|
|
9d826c7063 | ||
|
|
bf6155b1bd | ||
|
|
8c122b7e09 | ||
|
|
5357c813e4 | ||
|
|
84503d9a81 | ||
|
|
6642f97231 | ||
|
|
b5c3f930f5 | ||
|
|
ba8412faa7 | ||
|
|
30c09eec47 | ||
|
|
6b32608fa8 | ||
|
|
888c29373b | ||
|
|
785b685e8d | ||
|
|
10a2593979 | ||
|
|
a0fd35bf5e | ||
|
|
1466c4e6cd | ||
|
|
944acd90a6 | ||
|
|
7101238eae | ||
|
|
8d0deaebba | ||
|
|
ecb4240d8d | ||
|
|
1898068f6b | ||
|
|
d0b64b6521 | ||
|
|
684a83b7c2 | ||
|
|
2eb45768c6 | ||
|
|
5bf95f8e75 | ||
|
|
766a1a6c00 | ||
|
|
e32ae8027d | ||
|
|
7b6a6e6e73 | ||
|
|
4ba41c8ae7 | ||
|
|
6c92e29b3b | ||
|
|
299b358c8f | ||
|
|
fcf481d7f3 | ||
|
|
add374f0a7 | ||
|
|
dba380ff24 | ||
|
|
5ea1bd4896 | ||
|
|
e553192e59 | ||
|
|
d506754e63 | ||
|
|
deec60d1a9 | ||
|
|
6214e10f01 | ||
|
|
ebad623032 | ||
|
|
0bcc604757 | ||
|
|
cc51a4870c | ||
|
|
b52e432ab7 | ||
|
|
371f5d9d98 | ||
|
|
093b5a7a7b | ||
|
|
a1199a52af | ||
|
|
073a2d5487 | ||
|
|
3313689799 | ||
|
|
5bc2abb0df | ||
|
|
0bc5d865b0 | ||
|
|
8fa19b3190 | ||
|
|
72d1dcd75c | ||
|
|
d3c989036a | ||
|
|
6253fed3bb | ||
|
|
cb07b04664 | ||
|
|
1126419e2e | ||
|
|
52db51ce10 | ||
|
|
791ec9132a | ||
|
|
e6ba4f63f7 | ||
|
|
310e6749b8 | ||
|
|
2218d261d2 | ||
|
|
c186d564cc | ||
|
|
cd995c74bd | ||
|
|
da49ac3b4a | ||
|
|
7115f95e45 | ||
|
|
425218908e | ||
|
|
e666aff9eb | ||
|
|
cdb6df4a8f | ||
|
|
7ca101e5dd | ||
|
|
60a36ee5f0 | ||
|
|
aa8eb5d389 | ||
|
|
599d33b822 | ||
|
|
b82dc187c1 | ||
|
|
5f861aa389 | ||
|
|
b691ce19f7 | ||
|
|
961e3445ce | ||
|
|
6e72b8d76e | ||
|
|
216c5317e1 | ||
|
|
ad3174b207 | ||
|
|
b2949bae6c | ||
|
|
461ea6c54d | ||
|
|
0446431f2f | ||
|
|
7928424931 | ||
|
|
8cb2b4a496 | ||
|
|
84e4deecd6 | ||
|
|
0b8c296ef5 | ||
|
|
cba119e116 | ||
|
|
b199b24b23 | ||
|
|
9070585701 | ||
|
|
9254b11f8d | ||
|
|
b96fe12aeb | ||
|
|
a78c2d805d | ||
|
|
ffaa3153b3 | ||
|
|
937f9e1711 | ||
|
|
e3108f7382 | ||
|
|
abd7074e1d | ||
|
|
31d0f867cb | ||
|
|
eb19fb783f | ||
|
|
c376f7e97c | ||
|
|
153a0b9354 | ||
|
|
b6e8239e25 | ||
|
|
ddc3579409 | ||
|
|
0aac42e19b | ||
|
|
f66f250936 | ||
|
|
faa2a97b5e | ||
|
|
4acd6a3c06 | ||
|
|
726a87b644 | ||
|
|
54716e9144 | ||
|
|
d51e682110 | ||
|
|
a4570b7b2f | ||
|
|
faf28d40c6 | ||
|
|
225fec8ebf | ||
|
|
8f6d84f3ad | ||
|
|
6270e4b101 | ||
|
|
5489442ebd | ||
|
|
469ec71074 | ||
|
|
470c908453 | ||
|
|
a18e71dc9b | ||
|
|
fc9590cb7a | ||
|
|
803b49083e | ||
|
|
4867a0df2b | ||
|
|
f539ab39e7 | ||
|
|
8ef2ff43b0 | ||
|
|
21bce5ec23 | ||
|
|
d86ee7a028 | ||
|
|
8ca8f291a1 | ||
|
|
47929c9d37 | ||
|
|
29fa839b24 | ||
|
|
15d31dbcbf | ||
|
|
124f1151db | ||
|
|
360054dda6 | ||
|
|
fb5bcac2d7 | ||
|
|
c9c97e8a4e | ||
|
|
e12ff6508c | ||
|
|
1fc6a7a1c6 | ||
|
|
f4eb31570e | ||
|
|
a3809b3fc7 | ||
|
|
5c6bbd2793 | ||
|
|
b3dae901a0 | ||
|
|
34903cf870 | ||
|
|
57d4189f02 | ||
|
|
0aee86a885 | ||
|
|
09b3e6ee74 | ||
|
|
547b8b0f91 | ||
|
|
006679ce5d | ||
|
|
b0b0b0d8d1 | ||
|
|
6934fe03ce | ||
|
|
4d15d81c7e | ||
|
|
15d9c272e0 | ||
|
|
149ebc0cf3 | ||
|
|
5d40397fa3 | ||
|
|
038e0bea86 | ||
|
|
3b73121c29 | ||
|
|
eb74bebf9c | ||
|
|
47b5bf3dc9 | ||
|
|
bf5848b5f5 | ||
|
|
69cfb63d03 | ||
|
|
f391afaef8 | ||
|
|
4e7465c08f | ||
|
|
491891a001 | ||
|
|
9f19c608e7 | ||
|
|
64efe9def2 | ||
|
|
3272117564 | ||
|
|
706df9ab78 | ||
|
|
a89281f98b | ||
|
|
74cebb37a8 | ||
|
|
04fb38757c | ||
|
|
58d90cc699 | ||
|
|
2ba9272043 | ||
|
|
e98f24279a | ||
|
|
004cf1d5c0 | ||
|
|
935f5aa529 | ||
|
|
35e8ed0944 | ||
|
|
3dc6bfe6ee | ||
|
|
556e9f52c8 | ||
|
|
4e2292f48f | ||
|
|
61beac9ef2 | ||
|
|
8139a9585d | ||
|
|
906409921f | ||
|
|
f6fcf7b1b2 | ||
|
|
8501af7d16 | ||
|
|
0a2c42c27f | ||
|
|
4ace93bff3 | ||
|
|
c5cfa2f143 | ||
|
|
06fecf813a | ||
|
|
2a172b0c0b | ||
|
|
1f74334c92 | ||
|
|
522b18ff7d | ||
|
|
732cd3798b | ||
|
|
024ced4b3e | ||
|
|
65c6e90f68 | ||
|
|
5a3afb9951 | ||
|
|
89ef5f3df4 | ||
|
|
d5b470ec24 | ||
|
|
af67149851 | ||
|
|
0cb6a505d1 | ||
|
|
7173d854d8 | ||
|
|
defc67c51d | ||
|
|
0391ed0fa3 | ||
|
|
6540da0112 | ||
|
|
9fcfbb6688 | ||
|
|
44b3a4e4f7 | ||
|
|
65d1042643 | ||
|
|
528f83ac87 | ||
|
|
7f399d6854 | ||
|
|
2df46b0bf5 | ||
|
|
e9af19e3dc | ||
|
|
64cdcea6b9 | ||
|
|
ca60d4eb86 | ||
|
|
edcba7a35a | ||
|
|
8f81888784 | ||
|
|
06ced2d544 | ||
|
|
22d25fd67e | ||
|
|
7163184423 | ||
|
|
0ab4d76d0f | ||
|
|
55e30df5ec | ||
|
|
01a49a8b65 | ||
|
|
6f65ad5255 | ||
|
|
7766a7b239 | ||
|
|
4e8c2cd1b8 | ||
|
|
9f6f7b8977 | ||
|
|
0a1095bfc6 | ||
|
|
3a8b205e8c | ||
|
|
d6f4dd0418 | ||
|
|
205f2e3526 | ||
|
|
af60e61cc7 | ||
|
|
e84a9ae114 | ||
|
|
c49e89605c | ||
|
|
141dc6d80f | ||
|
|
eed9534309 | ||
|
|
72307cd89f | ||
|
|
0d5e993042 | ||
|
|
6fd7baa10f | ||
|
|
d146652ab4 | ||
|
|
afc1d55b52 | ||
|
|
b7f977c09c | ||
|
|
7141918e27 | ||
|
|
a77deecb2e | ||
|
|
f32b539e45 | ||
|
|
3422dff72c | ||
|
|
6fc7028507 | ||
|
|
6f72141616 | ||
|
|
96639524e5 | ||
|
|
aa519f764f | ||
|
|
6188786d12 | ||
|
|
2a6c754123 | ||
|
|
a5c980626b | ||
|
|
a304515f90 | ||
|
|
9ee905c033 | ||
|
|
3527c45556 | ||
|
|
0c45311bf3 | ||
|
|
ced7f26809 | ||
|
|
e14c973a74 | ||
|
|
a3703d9025 | ||
|
|
4c0375ac2c | ||
|
|
1604a5a666 | ||
|
|
ac9c87a70f | ||
|
|
156ce300f6 | ||
|
|
01051ad675 | ||
|
|
329760e39d | ||
|
|
26bdcad0b3 | ||
|
|
e563a79278 | ||
|
|
7b70371ffa | ||
|
|
15dc3f469f | ||
|
|
49c5a7289c | ||
|
|
3d451824f3 | ||
|
|
8ba41e9e19 | ||
|
|
3a2d8846bc | ||
|
|
a03a7162dd | ||
|
|
5a546cbbd0 | ||
|
|
dc09ac078a | ||
|
|
743d169a75 | ||
|
|
d210760e08 | ||
|
|
ebc58ccd00 | ||
|
|
65d66876a8 | ||
|
|
e96e99fe0c | ||
|
|
2cca25450e | ||
|
|
3d4368544f | ||
|
|
849b8d0322 | ||
|
|
f7b597ab6b | ||
|
|
964523c84c | ||
|
|
ba97bd3eb5 | ||
|
|
7d9e6f3a23 | ||
|
|
212606f638 | ||
|
|
8ad5f28e99 | ||
|
|
f8ee7bc015 | ||
|
|
36785f46f2 | ||
|
|
088a76b3cc | ||
|
|
38b854ed90 | ||
|
|
db11e1731b | ||
|
|
a84ff4a0f8 | ||
|
|
3cf0fabe15 | ||
|
|
ff405f0aef | ||
|
|
1a3282eb8a | ||
|
|
3f40358e2d | ||
|
|
2ca35a2924 | ||
|
|
5490893756 | ||
|
|
4b9bbd37e3 | ||
|
|
120ff6c5a1 | ||
|
|
e9aa584c27 | ||
|
|
e1211521ff | ||
|
|
13d49bc9fb | ||
|
|
cebd5b6c71 | ||
|
|
ca9add7d93 | ||
|
|
6cc079aac7 | ||
|
|
d8d1b10de7 | ||
|
|
d4c3756f75 | ||
|
|
99b1deea3c | ||
|
|
c6f734277f | ||
|
|
65a0f1df9b | ||
|
|
18ea3f5c58 | ||
|
|
a110a69d7f | ||
|
|
c61f187e1a | ||
|
|
2e65ffd332 | ||
|
|
7697acc8aa | ||
|
|
31338846e3 | ||
|
|
db669c8ad4 | ||
|
|
6d5b3b0b17 | ||
|
|
0bea3caae7 | ||
|
|
f0c8b477eb | ||
|
|
58f6e94f90 | ||
|
|
5efe05af24 | ||
|
|
6773279d3e | ||
|
|
3461ae1fdf | ||
|
|
45b86761f6 | ||
|
|
ac7a1acee3 | ||
|
|
41ec4907da | ||
|
|
cccdec584e | ||
|
|
472da835bd | ||
|
|
30de46b840 | ||
|
|
8921b319c8 | ||
|
|
aa49398c29 | ||
|
|
27a2849619 | ||
|
|
9d583e2e5c | ||
|
|
01825ad87f | ||
|
|
769a6a9c63 | ||
|
|
098d4bc85f | ||
|
|
26f7d67c50 | ||
|
|
42d2525b46 | ||
|
|
d9305c7620 | ||
|
|
185d87c24e | ||
|
|
a4080490bd | ||
|
|
714bcbdbb1 | ||
|
|
9158a38496 | ||
|
|
1f1f7f167f | ||
|
|
9453cc1c3b | ||
|
|
33a03d8119 | ||
|
|
2292fd1df6 | ||
|
|
18ac428a95 | ||
|
|
f0d0c304d6 | ||
|
|
7f041c96fb | ||
|
|
53ca11f85b | ||
|
|
a9f2a0c2ac | ||
|
|
181e2b21bb | ||
|
|
04bc6b4cb8 | ||
|
|
6058a1741b | ||
|
|
455f11af34 | ||
|
|
0b8848d63f | ||
|
|
1b7d6d09a8 | ||
|
|
c9592446c8 | ||
|
|
f2d2055f72 | ||
|
|
21ce0789ef | ||
|
|
794a8fc6aa | ||
|
|
408ef4a7df | ||
|
|
ab9b357c9b | ||
|
|
68d072cd60 | ||
|
|
aae1d37505 | ||
|
|
e927f2ff78 | ||
|
|
c271f3005a | ||
|
|
ca5697fb9c | ||
|
|
9150101498 | ||
|
|
6d0e6d0d16 | ||
|
|
c4236937b7 | ||
|
|
c1c0774572 | ||
|
|
fcb0ea9574 | ||
|
|
f095fde5a7 | ||
|
|
8bc2db1e6e | ||
|
|
7cbc15ea85 | ||
|
|
c2a9c670c4 | ||
|
|
4e5bdf6847 | ||
|
|
0aa6443a20 | ||
|
|
04278f553e | ||
|
|
349a041d71 | ||
|
|
58bf5062bf | ||
|
|
878f24ecae | ||
|
|
a15a374fb0 | ||
|
|
8a90f9d089 | ||
|
|
3007267951 | ||
|
|
710bb97cd3 | ||
|
|
18eb3a7fbf | ||
|
|
1d499b7052 | ||
|
|
36b28d83ed | ||
|
|
04fc03ccf5 | ||
|
|
ffb5898ea1 | ||
|
|
2c2eb0cb8d | ||
|
|
15dd8a60d7 | ||
|
|
65a0a6fb92 | ||
|
|
a0b35f4233 | ||
|
|
a271bc25c6 | ||
|
|
c988ed7988 | ||
|
|
c2ca0b1f29 | ||
|
|
efee87e4c5 | ||
|
|
98a990d9ea | ||
|
|
3a61df42ea | ||
|
|
d62baa0e51 | ||
|
|
dfe8806344 | ||
|
|
f1e95b960a | ||
|
|
7d0fa7f5d1 | ||
|
|
174f247a8e | ||
|
|
9cc41e8558 | ||
|
|
1fe8b9c5c9 | ||
|
|
496861587d | ||
|
|
93764fc5b5 | ||
|
|
22fab8dee0 | ||
|
|
dcbd729944 | ||
|
|
327a7b2a48 | ||
|
|
ad6bd8f39b | ||
|
|
95a91a10b3 | ||
|
|
b50f2b4c7e | ||
|
|
a1e0dac85c | ||
|
|
027f6dd538 | ||
|
|
94f902f788 | ||
|
|
bc5aaff9c9 | ||
|
|
770e8d7310 | ||
|
|
6a881e4613 | ||
|
|
0f36672783 | ||
|
|
7d5a7e0fe8 | ||
|
|
6977e233bb | ||
|
|
dbcb27e41a | ||
|
|
4b5b4464f4 | ||
|
|
4b6241e0b0 | ||
|
|
17fb60c481 | ||
|
|
51575b9f2d | ||
|
|
c943c1fc74 | ||
|
|
b55a45baa2 | ||
|
|
ae5db16d67 | ||
|
|
8f143be4b0 | ||
|
|
9ebafff392 | ||
|
|
e904c3df69 | ||
|
|
8ed1c958af | ||
|
|
a93e65df0a | ||
|
|
2fd861025a | ||
|
|
654c7d650a | ||
|
|
cb75196455 | ||
|
|
dd2b584c3d | ||
|
|
85d1cbff34 | ||
|
|
92d9c532c2 | ||
|
|
24bc61396e | ||
|
|
1655870d4d | ||
|
|
9b1a978cb5 | ||
|
|
fb27fb8aa4 | ||
|
|
a612af4f68 | ||
|
|
eb8e076732 | ||
|
|
0401e97ed3 | ||
|
|
c4f25b7a41 | ||
|
|
ef5b628b31 | ||
|
|
543c13d94b | ||
|
|
b9dad93c9d | ||
|
|
18696ec542 | ||
|
|
5efdffcda8 |
133
.gitignore
vendored
133
.gitignore
vendored
@@ -1,14 +1,7 @@
|
|||||||
## Ignore Visual Studio temporary files, build results, and
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
## files generated by popular Visual Studio add-ons.
|
## files generated by popular Visual Studio add-ons.
|
||||||
##
|
|
||||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
|
||||||
dist/
|
|
||||||
|
|
||||||
appsettings.Production.json
|
|
||||||
appsettings.Development.json
|
|
||||||
wwwroot
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
*.rsuser
|
|
||||||
*.suo
|
*.suo
|
||||||
*.user
|
*.user
|
||||||
*.userosscache
|
*.userosscache
|
||||||
@@ -24,21 +17,16 @@ wwwroot
|
|||||||
[Rr]eleases/
|
[Rr]eleases/
|
||||||
x64/
|
x64/
|
||||||
x86/
|
x86/
|
||||||
[Aa][Rr][Mm]/
|
|
||||||
[Aa][Rr][Mm]64/
|
|
||||||
bld/
|
bld/
|
||||||
[Bb]in/
|
[Bb]in/
|
||||||
[Oo]bj/
|
[Oo]bj/
|
||||||
[Ll]og/
|
[Ll]og/
|
||||||
|
|
||||||
# Visual Studio 2015/2017 cache/options directory
|
# Visual Studio 2015 cache/options directory
|
||||||
.vs/
|
.vs/
|
||||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
#wwwroot/
|
#wwwroot/
|
||||||
|
|
||||||
# Visual Studio 2017 auto generated files
|
|
||||||
Generated\ Files/
|
|
||||||
|
|
||||||
# MSTest test Results
|
# MSTest test Results
|
||||||
[Tt]est[Rr]esult*/
|
[Tt]est[Rr]esult*/
|
||||||
[Bb]uild[Ll]og.*
|
[Bb]uild[Ll]og.*
|
||||||
@@ -52,28 +40,18 @@ TestResult.xml
|
|||||||
[Rr]eleasePS/
|
[Rr]eleasePS/
|
||||||
dlldata.c
|
dlldata.c
|
||||||
|
|
||||||
# Benchmark Results
|
# DNX
|
||||||
BenchmarkDotNet.Artifacts/
|
|
||||||
|
|
||||||
# .NET Core
|
|
||||||
project.lock.json
|
project.lock.json
|
||||||
project.fragment.lock.json
|
|
||||||
artifacts/
|
artifacts/
|
||||||
|
|
||||||
# StyleCop
|
|
||||||
StyleCopReport.xml
|
|
||||||
|
|
||||||
# Files built by Visual Studio
|
|
||||||
*_i.c
|
*_i.c
|
||||||
*_p.c
|
*_p.c
|
||||||
*_h.h
|
*_i.h
|
||||||
*.ilk
|
*.ilk
|
||||||
*.meta
|
*.meta
|
||||||
*.obj
|
*.obj
|
||||||
*.iobj
|
|
||||||
*.pch
|
*.pch
|
||||||
*.pdb
|
*.pdb
|
||||||
*.ipdb
|
|
||||||
*.pgc
|
*.pgc
|
||||||
*.pgd
|
*.pgd
|
||||||
*.rsp
|
*.rsp
|
||||||
@@ -83,7 +61,6 @@ StyleCopReport.xml
|
|||||||
*.tlh
|
*.tlh
|
||||||
*.tmp
|
*.tmp
|
||||||
*.tmp_proj
|
*.tmp_proj
|
||||||
*_wpftmp.csproj
|
|
||||||
*.log
|
*.log
|
||||||
*.vspscc
|
*.vspscc
|
||||||
*.vssscc
|
*.vssscc
|
||||||
@@ -112,9 +89,6 @@ ipch/
|
|||||||
*.vspx
|
*.vspx
|
||||||
*.sap
|
*.sap
|
||||||
|
|
||||||
# Visual Studio Trace Files
|
|
||||||
*.e2e
|
|
||||||
|
|
||||||
# TFS 2012 Local Workspace
|
# TFS 2012 Local Workspace
|
||||||
$tf/
|
$tf/
|
||||||
|
|
||||||
@@ -135,14 +109,6 @@ _TeamCity*
|
|||||||
# DotCover is a Code Coverage Tool
|
# DotCover is a Code Coverage Tool
|
||||||
*.dotCover
|
*.dotCover
|
||||||
|
|
||||||
# AxoCover is a Code Coverage Tool
|
|
||||||
.axoCover/*
|
|
||||||
!.axoCover/settings.json
|
|
||||||
|
|
||||||
# Visual Studio code coverage results
|
|
||||||
*.coverage
|
|
||||||
*.coveragexml
|
|
||||||
|
|
||||||
# NCrunch
|
# NCrunch
|
||||||
_NCrunch_*
|
_NCrunch_*
|
||||||
.*crunch*.local.xml
|
.*crunch*.local.xml
|
||||||
@@ -174,7 +140,7 @@ publish/
|
|||||||
# Publish Web Output
|
# Publish Web Output
|
||||||
*.[Pp]ublish.xml
|
*.[Pp]ublish.xml
|
||||||
*.azurePubxml
|
*.azurePubxml
|
||||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||||
# but database connection strings (with potential passwords) will be unencrypted
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
*.pubxml
|
*.pubxml
|
||||||
*.publishproj
|
*.publishproj
|
||||||
@@ -187,12 +153,12 @@ PublishScripts/
|
|||||||
# NuGet Packages
|
# NuGet Packages
|
||||||
*.nupkg
|
*.nupkg
|
||||||
# The packages folder can be ignored because of Package Restore
|
# The packages folder can be ignored because of Package Restore
|
||||||
**/[Pp]ackages/*
|
**/packages/*
|
||||||
# except build/, which is used as an MSBuild target.
|
# except build/, which is used as an MSBuild target.
|
||||||
!**/[Pp]ackages/build/
|
!**/packages/build/
|
||||||
# Uncomment if necessary however generally it will be regenerated when needed
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
#!**/[Pp]ackages/repositories.config
|
#!**/packages/repositories.config
|
||||||
# NuGet v3's project.json files produces more ignorable files
|
# NuGet v3's project.json files produces more ignoreable files
|
||||||
*.nuget.props
|
*.nuget.props
|
||||||
*.nuget.targets
|
*.nuget.targets
|
||||||
|
|
||||||
@@ -209,13 +175,12 @@ AppPackages/
|
|||||||
BundleArtifacts/
|
BundleArtifacts/
|
||||||
Package.StoreAssociation.xml
|
Package.StoreAssociation.xml
|
||||||
_pkginfo.txt
|
_pkginfo.txt
|
||||||
*.appx
|
|
||||||
|
|
||||||
# Visual Studio cache files
|
# Visual Studio cache files
|
||||||
# files ending in .cache can be ignored
|
# files ending in .cache can be ignored
|
||||||
*.[Cc]ache
|
*.[Cc]ache
|
||||||
# but keep track of directories ending in .cache
|
# but keep track of directories ending in .cache
|
||||||
!?*.[Cc]ache/
|
!*.[Cc]ache/
|
||||||
|
|
||||||
# Others
|
# Others
|
||||||
ClientBin/
|
ClientBin/
|
||||||
@@ -223,15 +188,11 @@ ClientBin/
|
|||||||
*~
|
*~
|
||||||
*.dbmdl
|
*.dbmdl
|
||||||
*.dbproj.schemaview
|
*.dbproj.schemaview
|
||||||
*.jfm
|
|
||||||
*.pfx
|
*.pfx
|
||||||
*.publishsettings
|
*.publishsettings
|
||||||
|
node_modules/
|
||||||
orleans.codegen.cs
|
orleans.codegen.cs
|
||||||
|
|
||||||
# Including strong name files can present a security risk
|
|
||||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
|
||||||
#*.snk
|
|
||||||
|
|
||||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
#bower_components/
|
#bower_components/
|
||||||
@@ -246,20 +207,15 @@ _UpgradeReport_Files/
|
|||||||
Backup*/
|
Backup*/
|
||||||
UpgradeLog*.XML
|
UpgradeLog*.XML
|
||||||
UpgradeLog*.htm
|
UpgradeLog*.htm
|
||||||
ServiceFabricBackup/
|
|
||||||
*.rptproj.bak
|
|
||||||
|
|
||||||
# SQL Server files
|
# SQL Server files
|
||||||
*.mdf
|
*.mdf
|
||||||
*.ldf
|
*.ldf
|
||||||
*.ndf
|
|
||||||
|
|
||||||
# Business Intelligence projects
|
# Business Intelligence projects
|
||||||
*.rdl.data
|
*.rdl.data
|
||||||
*.bim.layout
|
*.bim.layout
|
||||||
*.bim_*.settings
|
*.bim_*.settings
|
||||||
*.rptproj.rsuser
|
|
||||||
*- Backup*.rdl
|
|
||||||
|
|
||||||
# Microsoft Fakes
|
# Microsoft Fakes
|
||||||
FakesAssemblies/
|
FakesAssemblies/
|
||||||
@@ -269,7 +225,6 @@ FakesAssemblies/
|
|||||||
|
|
||||||
# Node.js Tools for Visual Studio
|
# Node.js Tools for Visual Studio
|
||||||
.ntvs_analysis.dat
|
.ntvs_analysis.dat
|
||||||
node_modules/
|
|
||||||
|
|
||||||
# Visual Studio 6 build log
|
# Visual Studio 6 build log
|
||||||
*.plg
|
*.plg
|
||||||
@@ -277,9 +232,6 @@ node_modules/
|
|||||||
# Visual Studio 6 workspace options file
|
# Visual Studio 6 workspace options file
|
||||||
*.opt
|
*.opt
|
||||||
|
|
||||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
|
||||||
*.vbw
|
|
||||||
|
|
||||||
# Visual Studio LightSwitch build output
|
# Visual Studio LightSwitch build output
|
||||||
**/*.HTMLClient/GeneratedArtifacts
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
**/*.DesktopClient/GeneratedArtifacts
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
@@ -299,48 +251,25 @@ paket-files/
|
|||||||
.idea/
|
.idea/
|
||||||
*.sln.iml
|
*.sln.iml
|
||||||
|
|
||||||
# CodeRush personal settings
|
# BookStore
|
||||||
.cr/personal
|
src/Acme.BookStore.Web/Logs/*
|
||||||
|
src/Acme.BookStore.Web.Host/Logs/*
|
||||||
|
src/Acme.BookStore.AuthServer/Logs/*
|
||||||
|
src/Acme.BookStore.HttpApi.Host/Logs/*
|
||||||
|
src/Acme.BookStore.HttpApi.HostWithIds/Logs/*
|
||||||
|
src/Acme.BookStore.DbMigrator/Logs/*
|
||||||
|
src/Acme.BookStore.Blazor.Server/Logs/*
|
||||||
|
src/Acme.BookStore.Blazor.Server.Tiered/Logs/*
|
||||||
|
|
||||||
# Python Tools for Visual Studio (PTVS)
|
# Use abp install-libs to restore.
|
||||||
__pycache__/
|
**/wwwroot/libs/*
|
||||||
*.pyc
|
dist
|
||||||
|
.vscode
|
||||||
# Cake - Uncomment if you are using it
|
/Yi.Abp.Net8/src/Yi.Abp.Web/appsettings.Development.json
|
||||||
# tools/**
|
/Yi.Abp.Net8/src/Yi.Abp.Web/appsettings.Production.json
|
||||||
# !tools/packages.config
|
Logs
|
||||||
|
logs
|
||||||
# Tabs Studio
|
/Yi.Abp.Net8/test/Yi.Abp.Test/appsettings.Development.json
|
||||||
*.tss
|
/Yi.Abp.Net8/test/Yi.Abp.Test/appsettings.Production.json
|
||||||
|
database_backup
|
||||||
# Telerik's JustMock configuration file
|
/Yi.Abp.Net8/src/Yi.Abp.Web/appsettings.Staging.json
|
||||||
*.jmconfig
|
|
||||||
|
|
||||||
# BizTalk build output
|
|
||||||
*.btp.cs
|
|
||||||
*.btm.cs
|
|
||||||
*.odx.cs
|
|
||||||
*.xsd.cs
|
|
||||||
|
|
||||||
# OpenCover UI analysis results
|
|
||||||
OpenCover/
|
|
||||||
|
|
||||||
# Azure Stream Analytics local run output
|
|
||||||
ASALocalRun/
|
|
||||||
|
|
||||||
# MSBuild Binary and Structured Log
|
|
||||||
*.binlog
|
|
||||||
|
|
||||||
# NVidia Nsight GPU debugger configuration file
|
|
||||||
*.nvuser
|
|
||||||
|
|
||||||
# MFractors (Xamarin productivity tool) working folder
|
|
||||||
.mfractor/
|
|
||||||
|
|
||||||
# Local History for Visual Studio
|
|
||||||
.localhistory/
|
|
||||||
|
|
||||||
# BeatPulse healthcheck temp database
|
|
||||||
healthchecksdb
|
|
||||||
|
|
||||||
appsettings.Development.json
|
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2022 jacktang
|
Copyright (c) 2023 橙子
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
275
README.md
275
README.md
@@ -1,28 +1,31 @@
|
|||||||
<h1 align="center"><img align="left" height="150px" src="https://user-images.githubusercontent.com/68722157/138828506-f58b7c57-5e10-4178-8f7d-5d5e12050113.png"> Yi框架</h1>
|
<h1 align="center"><img align="left" height="150px" src="https://ccnetcore.com/prod-api/wwwroot/logo.png"> Yi框架</h1>
|
||||||
<h4 align="center">一套以用户体验出发的.Net6 Web开源框架</h4>
|
<h4 align="center">一套以用户体验出发的.Net8 Web开源框架</h4>
|
||||||
<h5 align="center">支持原生版本、Furion版本、Abp版本,前端后台接入Ruoyi Vue3.0</h5>
|
<h5 align="center">支持Abp.vNext 版本原生版本、Furion版本,前端后台接入Ruoyi Vue3.0</h5>
|
||||||
<h2 align="center">集大成者,终究轮子</h2>
|
<h2 align="center">集大成者,终究轮子</h2>
|
||||||
|
|
||||||
|
[](https://gitee.com/ccnetcore/Yi)
|
||||||
|
[](https://gitee.com/ccnetcore/Yi)
|
||||||
|
[](https://gitee.com/ccnetcore/Yi)
|
||||||
|
|
||||||
[English](README-en.md) | 简体中文
|
[English](README-en.md) | 简体中文
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
****
|
****
|
||||||
### 简介:
|
## :tw-1f34e: 简介:
|
||||||
|
YiFramework是一个基于.Net8+Abp.vNext+SqlSugar的DDD领域驱动设计后端开源框架
|
||||||
|
|
||||||
|
谁说Abp复杂?谁说DDD难?`打破常规,化繁为简`,新人入门,项目二开,最佳方式之一
|
||||||
|
|
||||||
**中文:意框架**(和他的名字一样“简易”,同时接入Java的Ruoyi Vue3.0前端)
|
**中文:意框架**(和他的名字一样“简易”,同时接入Java的Ruoyi Vue3.0前端)
|
||||||
|
|
||||||
模块分化较多,可根据业务自行引用或抛弃,集大成者,大而全乎,也许你能从中学习到一些独特见解
|
模块化,可根据业务自行引用或抛弃,集大成者,大而全乎,也许你能从中学习到一些独特见解
|
||||||
|
|
||||||
**英文:YiFramework**
|
**英文:YiFramework**
|
||||||
|
|
||||||
Yi框架-一套与SqlSugar一样爽的.Net6开源框架。
|
Yi框架-一套与SqlSugar一样爽的.Net8开源框架。
|
||||||
与Sqlsugar理念一致,以用户体验出发。
|
与Sqlsugar理念一致,以用户体验出发。
|
||||||
适合.Net6学习、Sqlsugar学习 、项目二次开发。
|
适合.Net8学习、Sqlsugar学习 、项目二次开发。
|
||||||
集大成者,终究轮子
|
集大成者,终究轮子
|
||||||
|
|
||||||
Yi框架最新版本标签:`v3.0.0`,具体版本可以查看标签迭代
|
(更新频繁,可watching持续关注。)
|
||||||
|
|
||||||
(项目与Sqlsugar同步更新,但这作者老杰哥代码天天爆肝到凌晨两点,我们也尽量会跟上他的脚步。更新频繁,所以可watching持续关注。)
|
|
||||||
|
|
||||||
————这不仅仅是一个程序,更是一个艺术品,面向艺术的开发!
|
————这不仅仅是一个程序,更是一个艺术品,面向艺术的开发!
|
||||||
|
|
||||||
@@ -30,129 +33,91 @@ Yi框架最新版本标签:`v3.0.0`,具体版本可以查看标签迭代
|
|||||||
|
|
||||||
**分支:**
|
**分支:**
|
||||||
|
|
||||||
(本项目由EFCore版本历经3年不断迭代至Sqlsugar版本,现EFcore版本已弃用,目前sqlsugar已带业务功能)
|
- (推荐) **Abp**: 基于Abp.vNext分支,DDD领域驱动设计,回归开发本质,极度简单,用起来贼爽
|
||||||
|
|
||||||
- **Framework**: 框架分支,所有东西都在这里
|
- **Furion**: 基于Furion分支
|
||||||
|
|
||||||
- **Furion**: 基于Furion分支,回归开发本质,极度简单,用起来贼爽
|
|
||||||
|
|
||||||
- ~~**SqlSugar**:.Net6 DDD领域驱动设计 简单分层微服务架构~~
|
|
||||||
|
|
||||||
- ~~**SqlSugar-Dev**:为sqlsugar分支的实时开发版本~~
|
|
||||||
|
|
||||||
- ~~**ec**: EFcore完整电商项目~~
|
|
||||||
|
|
||||||
****
|
****
|
||||||
|
|
||||||
### 演示地址:
|
## :tw-1f350: 官网及演示地址:
|
||||||
|
|
||||||
废话少说直接上地址,**请不要**更改里面的数据
|
废话少说直接上地址
|
||||||
|
|
||||||
官网网址:[ccnetcore.com](https://ccnetcore.com) (已上线,欢迎加入)
|
Yi社区官网网址:[ccnetcore.com](https://ccnetcore.com) (已上线,欢迎加入)
|
||||||
|
|
||||||
Bbs社区系统:[ccnetcore.com](https://ccnetcore.com) (已上线,欢迎加入)
|
Rbac后台管理系统:已上线,暂不提供演示地址,可本地部署访问
|
||||||
|
|
||||||
Rbac后台管理系统:[yi.ccnetcore.com](http://yi.ccnetcore.com) (已上线)~~管理员账号:cc 、 123456~~
|
App移动端系统:已上线,暂不提供演示地址,可本地部署访问
|
||||||
|
|
||||||
网关地址:~~[gate.ccnetcore.com/swagger](http://gate.ccnetcore.com/swagger)~~(目前使用单体架构)
|
Rbac演示地址:https://ccnetcore.com:1000 (用户cc、密码123456)
|
||||||
|
|
||||||
### 支持:
|
|
||||||
|
## :tw-1f351: 支持:
|
||||||
|
|
||||||
- [x] 完全支持单体应用架构
|
- [x] 完全支持单体应用架构
|
||||||
- [x] 完全支持分布式应用架构
|
- [x] 完全支持分布式应用架构
|
||||||
- [x] 完全支持微服务架构
|
- [x] 完全支持微服务架构
|
||||||
- [ ] 即将支持网格服务架构(我们将在后续版本加入dapr)
|
|
||||||
|
|
||||||
****
|
****
|
||||||
### 详细到爆炸的Yi框架教程导航:
|
## :tw-1f352: 详细到爆炸的Yi框架教程导航:
|
||||||
|
|
||||||
1. [框架快速开始](https://ccnetcore.com/article/1641733850189139969)(已完成)
|
1. [框架快速开始教程](https://ccnetcore.com/article/aaa00329-7f35-d3fe-d258-3a0f8380b742)(已完成)
|
||||||
2. [框架模块教程](https://ccnetcore.com/article/1641733991574933505)(已完成)
|
2. [框架功能模块教程](https://ccnetcore.com/article/8c464ab3-8ba5-2761-a4b0-3a0f83a9f312)(已完成)
|
||||||
3. [应用模块教程](https://ccnetcore.com/article/1641734073091231745)
|
3. [实战演练开发教程](https://ccnetcore.com/article/e89c9593-f337-ada7-d108-3a0f83ae48e6)
|
||||||
4. [Yi.RBAC后台系统](https://ccnetcore.com/article/1641734171128893441)
|
4. [橙子运维CICD教程](https://ccnetcore.com/article/6b80ed42-50cd-db15-c073-3a0fa8f7fd77)(已完成)
|
||||||
5. [Yi.BBS社区系统](https://ccnetcore.com/article/1641734308475572225)
|
5. [版本更新日志](https://ccnetcore.com/article/e9e69a38-ce1e-06f5-7944-3a0fdc942ef3)(已完成)
|
||||||
|
|
||||||
****
|
****
|
||||||
### 它的理念:
|
## :tw-1f353: 它的理念:
|
||||||
|
谁说Abp复杂?谁说DDD难?打破常规,化繁为简,新人入门,项目二开,最佳方式之一
|
||||||
|
|
||||||
|
> 一百个人,就有一百种DDD,Yi框架不一定是极度严格的DDD,而是站在巨人的肩膀上,经过极多项目的提炼,摸索出一种最佳实践
|
||||||
|
|
||||||
|
|
||||||
优雅的进行快速开发,通常,简单程度与优雅程度不可兼得,Yi框架并不一昧的追求极致的解耦,会站在用户使用角度上,在使用难易度进行考虑衡量
|
优雅的进行快速开发,通常,简单程度与优雅程度不可兼得,Yi框架并不一昧的追求极致的解耦,会站在用户使用角度上,在使用难易度进行考虑衡量
|
||||||
|
|
||||||
例如:我们大部分功能紧密贴合Sqlsugar,虽然缺少其他orm的替换性,但在使用程度上降低的使用难度
|
|
||||||
|
|
||||||
例如:我们在应用层中使用属性注入,虽然依赖关系会比较模糊,但是使用起来会减少一定代码量
|
|
||||||
|
|
||||||
> 一个面向用户的快速开发后端框架
|
> 一个面向用户的快速开发后端框架
|
||||||
|
|
||||||
在真正的使用这,你会明白这一点,极致的简单,也是优雅的一种体现。
|
在真正的使用这,你会明白这一点,极致的简单,也是优雅的一种体现。
|
||||||
****
|
****
|
||||||
|
|
||||||
### 特点:
|
## :tw-1f354: 特点
|
||||||
- 面向用户的后端框架,使用简单,适合小型、企业级项目
|
- 面向用户的后端框架,使用简单,适合小型、中型、企业级项目
|
||||||
- 项目内置源码,不打包
|
- 项目直接内置源码,不打包,非常适合进行二开改造
|
||||||
- 开箱即用
|
|
||||||
- 支持模块化
|
|
||||||
- 支持动态Api
|
|
||||||
- 支持属性注入
|
|
||||||
- 内置包含大量通用场景模块
|
- 内置包含大量通用场景模块
|
||||||
|
- 优雅支持分布式及微服务架构
|
||||||
- 等等
|
- 等等
|
||||||
|
|
||||||
### 基础设施简介
|
## :tw-1f340: 基础设施简介
|
||||||
- Jwt鉴权
|
|
||||||
- 接口级别授权
|
|
||||||
- 对象映射
|
|
||||||
- O/RM
|
|
||||||
- 数据过滤
|
|
||||||
- 多租户
|
|
||||||
- 逻辑删除
|
|
||||||
- 审计日志
|
|
||||||
- 种子数据
|
|
||||||
- 工作单元
|
|
||||||
- 模块化
|
|
||||||
- 动态Api
|
|
||||||
- 属性注入
|
|
||||||
- 自动依赖注入
|
|
||||||
- 当前用户
|
|
||||||
- 仓储
|
|
||||||
- Crud
|
|
||||||
|
|
||||||
|
以下全部功能可直接使用:
|
||||||
|
|
||||||
### 内置模块简介
|
- [Abp.vNext官网](https://docs.abp.io/zh-Hans/abp/latest/)
|
||||||
- 后台任务
|
|
||||||
- 本地缓存
|
|
||||||
- 分布式缓存
|
|
||||||
- 事件总线
|
|
||||||
- 字典管理
|
|
||||||
- 文件管理
|
|
||||||
- 图片操作
|
|
||||||
- Excel操作
|
|
||||||
- 操作日志管理
|
|
||||||
- Sms短信
|
|
||||||
- 微信支付
|
|
||||||
- 模板代码生成
|
|
||||||
|
|
||||||
### 业务项目
|
- [SqlSugar官网](https://www.donet5.com/home/doc)
|
||||||
- RABC后台管理系统
|
|
||||||
- BBS社区系统
|
## :tw-1f341: 内置模块简介
|
||||||
|
- Rbac权限管理系统(已上线)
|
||||||
|
- Bbs论坛社区系统(已上线)
|
||||||
|
|
||||||
> 重复的东西,无需再写一遍,这也是优雅的体现之一
|
> 重复的东西,无需再写一遍,这也是优雅的体现之一
|
||||||
|
|
||||||
****
|
****
|
||||||
### 核心技术
|
## :tw-1f31e: 核心技术
|
||||||
#### 后端
|
#### 后端
|
||||||
C# Asp.NetCore 6.0
|
C# Asp.NetCore 8.0
|
||||||
- [x] 动态Api:Cike.AutoApi
|
- [x] 动态Api:Abp.vNext
|
||||||
- [x] 鉴权授权:Jwt
|
- [x] 鉴权授权:Jwt
|
||||||
- [x] 日志:Nlog
|
- [x] 日志:Serilog
|
||||||
- [x] 模块化:StartupModules
|
- [x] 模块化:Abp.vNext
|
||||||
- [x] 依赖注入:Autofac
|
- [x] 依赖注入:Autofac
|
||||||
- [x] 对象映射:Mapster
|
- [x] 对象映射:Mapster
|
||||||
- [x] ORM:SqlsugarCore
|
- [x] ORM: SqlsugarCore
|
||||||
- [x] 多租户:Abp
|
- [x] 多租户:Abp.vNext
|
||||||
- [x] 后台任务:Quartz.Net
|
- [x] 后台任务:Quartz.Net
|
||||||
- [x] 本地缓存:MemortCache
|
- [x] 本地缓存:Abp.vNext
|
||||||
- [x] 分布式缓存:CSRedisCore
|
- [x] 分布式缓存:Abp.vNext
|
||||||
- [x] 事件总线:Cike.EventBus
|
- [x] 事件总线:Abp.vNext
|
||||||
- [x] 图像操作:SixLabors.ImageSharp
|
|
||||||
- [x] Excle操作:ExcelToObject.Npoi
|
|
||||||
|
|
||||||
#### 前端
|
#### 前端
|
||||||
js Vue3.2
|
js Vue3.2
|
||||||
@@ -168,10 +133,11 @@ js Vue3.2
|
|||||||
- [x] CICD:gitlab+Jenkins
|
- [x] CICD:gitlab+Jenkins
|
||||||
- [x] Docker:harbor
|
- [x] Docker:harbor
|
||||||
|
|
||||||
****
|
|
||||||
### 业务支持模块:
|
|
||||||
|
|
||||||
RABC权限管理系统(正在更新)
|
****
|
||||||
|
## :tw-1f366: 业务支持模块:
|
||||||
|
|
||||||
|
#### :tw-1f42f: RABC权限管理系统(持续更新)
|
||||||
(采用ruoyi前端)
|
(采用ruoyi前端)
|
||||||
- 用户管理
|
- 用户管理
|
||||||
- 角色管理
|
- 角色管理
|
||||||
@@ -183,70 +149,99 @@ RABC权限管理系统(正在更新)
|
|||||||
- 用户在线
|
- 用户在线
|
||||||
- 操作日志
|
- 操作日志
|
||||||
- 登录日志
|
- 登录日志
|
||||||
- 等等
|
- 定时任务
|
||||||
|
- 缓存列表
|
||||||
|
- 服务监控
|
||||||
|
- WebFirst代码生成工具
|
||||||
|
|
||||||
**演示截图:**
|
#### :tw-1f431: BBS社区论坛系统(持续更新)
|
||||||

|
(采用vue3前端)
|
||||||

|
- 文章功能
|
||||||

|
- 板块功能
|
||||||

|
- 主题功能
|
||||||

|
- 个人中心
|
||||||

|
- 授权中心
|
||||||

|
- 权限管理
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
BBS论坛系统(持续迭代)
|
#### :star: 演示截图:
|
||||||
- 文章管理
|
<table>
|
||||||
- 评论管理
|
<tr>
|
||||||
- 主题管理
|
<td><img src="readme/101.png"/></td>
|
||||||
- 板块管理
|
<td><img src="readme/102.png"/></td>
|
||||||
- 点赞管理
|
</tr>
|
||||||
- 等等
|
<tr>
|
||||||
|
<td><img src="readme/103.png"/></td>
|
||||||
|
<td><img src="readme/104.png"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><img src="readme/1.png"/></td>
|
||||||
|
<td><img src="readme/2.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img src="readme/3.png"/></td>
|
||||||
|
<td><img src="readme/4.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img src="readme/3.png"/></td>
|
||||||
|
<td><img src="readme/4.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img src="readme/5.png"/></td>
|
||||||
|
<td><img src="readme/6.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img src="readme/7.png"/></td>
|
||||||
|
<td><img src="readme/8.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img src="readme/9.png"/></td>
|
||||||
|
<td><img src="readme/10.png"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img src="readme/11.png"/></td>
|
||||||
|
<td><img src="readme/12.png"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
ERP进销存系统(正在更新)
|
## :tw-1f44f: 感谢:
|
||||||
- 供货商管理
|
|
||||||
- 等等
|
|
||||||
|
|
||||||
SHOP电商系统(持续迭代)
|
|
||||||
- SPU管理
|
|
||||||
- SKU管理
|
|
||||||
- 商品规格
|
|
||||||
- 商品分类
|
|
||||||
- 等等
|
|
||||||
|
|
||||||
|
|
||||||
****
|
|
||||||
### 感谢:
|
|
||||||
|
|
||||||
**大力支持**: Eleven神、Sqlsugar上海杰哥、Gerry、哲学的老张
|
|
||||||
|
|
||||||
[橙子]https://ccnetcore.com
|
[橙子]https://ccnetcore.com
|
||||||
|
|
||||||
[lzw]https://github.com/yeslode
|
[XWen]https://gitee.com/on-wensil
|
||||||
|
|
||||||
[朝夕教育]https://www.zhaoxiedu.net
|
[朝夕教育]https://www.zhaoxiedu.net
|
||||||
|
|
||||||
[Sqlsugar]https://www.donet5.com/Home/Doc
|
[Sqlsugar老杰哥]https://www.donet5.com/Home/Doc
|
||||||
|
|
||||||
[RuYiAdmin]https://gitee.com/pang-mingjun/RuYiAdmin
|
[车神]微信公众号搜索Dotnet技术进阶
|
||||||
|
|
||||||
[ZrAdminNetCore]https://gitee.com/izory/ZrAdminNetCore
|
[RuYiAdmin如意老兄]https://gitee.com/pang-mingjun/RuYiAdmin
|
||||||
|
|
||||||
|
[ZrAdminNetCore字母老哥]https://gitee.com/izory/ZrAdminNetCore
|
||||||
|
|
||||||
|
[Admin.NET]https://gitee.com/zuohuaijun/Admin.NET
|
||||||
|
|
||||||
|
[Furion百小僧]https://furion.baiqian.ltd/
|
||||||
|
|
||||||
****
|
****
|
||||||
### 联系我们:
|
## :tw-1f438: 联系我们:
|
||||||
|
|
||||||
作者QQ:`454313500`,2029年之前作者24小时在线,时刻保持活跃更新。
|
作者QQ:`454313500`,2029年之前作者24小时在线,时刻保持活跃更新。
|
||||||
|
|
||||||
QQ交流群:官方一群(已满)、官方二群(已满)、官方三群:`786308927`(加作者QQ后同意)
|
QQ交流群:官方一群(已满)、官方二群(已满)、官方三群:`786308927`(已满)、官方四群:`498310311`(基本已满)、官方五群:`981136525`(新群)
|
||||||
|
|
||||||
|
微信交流群:加作者微信 chengzilaoge520 (橙子老哥520),备注拉群
|
||||||
|
|
||||||
联系作者,这里人人都是顾问
|
联系作者,这里人人都是顾问
|
||||||
|
|
||||||
官方网址留言区:[ccnetcore.com](https://ccnetcore.com)
|
官方网址留言区:[ccnetcore.com](https://ccnetcore.com)
|
||||||
|
|
||||||
****
|
****
|
||||||
### FQA:
|
## :tw-1f41e: FQA:
|
||||||
|
|
||||||
前往官网查看留言区
|
前往官网查看留言区
|
||||||
|
|
||||||
|
|||||||
30
Yi.Abp.Net8/.dockerignore
Normal file
30
Yi.Abp.Net8/.dockerignore
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
**/.classpath
|
||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/.git
|
||||||
|
**/.gitignore
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
|
**/.toolstarget
|
||||||
|
**/.vs
|
||||||
|
**/.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/*.dbmdl
|
||||||
|
**/*.jfm
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/docker-compose*
|
||||||
|
**/Dockerfile*
|
||||||
|
**/node_modules
|
||||||
|
**/npm-debug.log
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
||||||
|
LICENSE
|
||||||
|
README.md
|
||||||
|
!**/.gitignore
|
||||||
|
!.git/HEAD
|
||||||
|
!.git/config
|
||||||
|
!.git/packed-refs
|
||||||
|
!.git/refs/heads/**
|
||||||
509
Yi.Abp.Net8/Yi.Abp.sln
Normal file
509
Yi.Abp.Net8/Yi.Abp.sln
Normal file
@@ -0,0 +1,509 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.7.34202.233
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Web", "src\Yi.Abp.Web\Yi.Abp.Web.csproj", "{15913E44-DA92-44B9-9AC5-E9457EA34BF5}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.SqlSugarCore", "framework\Yi.Framework.SqlSugarCore\Yi.Framework.SqlSugarCore.csproj", "{DC431ECC-C75D-4B01-8B79-4861948179BB}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B782C78B-6C17-49E6-A237-3383BA720766}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0D10EEF2-FBAE-4C72-B816-A52823FC299B}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "framework", "framework", "{77B949E9-530E-45A5-9657-20F7D5C6875C}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "module", "module", "{2317227D-7796-4E7B-BEDB-7CD1CAE7B853}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.SqlSugarCore", "src\Yi.Abp.SqlSugarCore\Yi.Abp.SqlSugarCore.csproj", "{9A7BBA40-28D6-4900-9E1D-D627A516EE72}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Application", "src\Yi.Abp.Application\Yi.Abp.Application.csproj", "{746DBBD6-23E8-4D5D-9D23-E2902BE338BD}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Application.Contracts", "src\Yi.Abp.Application.Contracts\Yi.Abp.Application.Contracts.csproj", "{51EEBF59-3D37-4681-981D-56F8D8F8968D}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Domain", "src\Yi.Abp.Domain\Yi.Abp.Domain.csproj", "{7B15C198-538A-44ED-A6AA-3A0FEAA1D2BD}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Domain.Shared", "src\Yi.Abp.Domain.Shared\Yi.Abp.Domain.Shared.csproj", "{F4D5A496-BFBE-470B-A05B-CB5823B47E72}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6A5375C6-1D55-4E93-9B19-736F1C68CBC3}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
common.props = common.props
|
||||||
|
end.sh = end.sh
|
||||||
|
logo.png = logo.png
|
||||||
|
start.sh = start.sh
|
||||||
|
tool.bat = tool.bat
|
||||||
|
usings.props = usings.props
|
||||||
|
version.props = version.props
|
||||||
|
publish.bat = publish.bat
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.SqlSugarCore.Abstractions", "framework\Yi.Framework.SqlSugarCore.Abstractions\Yi.Framework.SqlSugarCore.Abstractions.csproj", "{FD6D6860-3753-4747-8A26-977E4A3001F9}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Core", "framework\Yi.Framework.Core\Yi.Framework.Core.csproj", "{ECE874D4-F882-4EF4-84A6-A842D9B8FBC5}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Mapster", "framework\Yi.Framework.Mapster\Yi.Framework.Mapster.csproj", "{1995A019-C8AE-467E-B427-ED57D6CBF44F}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.AspNetCore", "framework\Yi.Framework.AspNetCore\Yi.Framework.AspNetCore.csproj", "{F5011C0D-209B-4A98-BBE3-68157503EEF8}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Ddd.Application.Contracts", "framework\Yi.Framework.Ddd.Application.Contracts\Yi.Framework.Ddd.Application.Contracts.csproj", "{0A8296A3-C11F-4F13-8E49-6BC8188D4804}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Ddd.Application", "framework\Yi.Framework.Ddd.Application\Yi.Framework.Ddd.Application.csproj", "{F0141C17-0EBD-4261-98D5-1C5B7BC1DFEE}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "rbac", "rbac", "{9CC7A457-1236-40BA-B47B-E7B710A3F061}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.Application.Contracts", "module\rbac\Yi.Framework.Rbac.Application.Contracts\Yi.Framework.Rbac.Application.Contracts.csproj", "{1C360956-8CD8-407E-B87F-D0BD57068EB9}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.Application", "module\rbac\Yi.Framework.Rbac.Application\Yi.Framework.Rbac.Application.csproj", "{4F02B08D-5FE2-460D-BCA5-DA565151AE30}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.Domain", "module\rbac\Yi.Framework.Rbac.Domain\Yi.Framework.Rbac.Domain.csproj", "{C04D3F71-1557-46D0-B810-97B1FBB6AB73}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.Domain.Shared", "module\rbac\Yi.Framework.Rbac.Domain.Shared\Yi.Framework.Rbac.Domain.Shared.csproj", "{A2BB899D-4F9A-4184-81BD-94B938E2AB03}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.SqlSugarCore", "module\rbac\Yi.Framework.Rbac.SqlSugarCore\Yi.Framework.Rbac.SqlSugarCore.csproj", "{4503A2F9-139D-4CBC-AF11-689C34F0D77B}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bbs", "bbs", "{E902A945-4F41-4E96-A0DA-9F66CDA22261}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Bbs.Domain.Shared", "module\bbs\Yi.Framework.Bbs.Domain.Shared\Yi.Framework.Bbs.Domain.Shared.csproj", "{EB9349E2-256D-41EB-A345-21635A1361B3}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Bbs.Domain", "module\bbs\Yi.Framework.Bbs.Domain\Yi.Framework.Bbs.Domain.csproj", "{4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Bbs.Application.Contracts", "module\bbs\Yi.Framework.Bbs.Application.Contracts\Yi.Framework.Bbs.Application.Contracts.csproj", "{7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Bbs.Application", "module\bbs\Yi.Framework.Bbs.Application\Yi.Framework.Bbs.Application.csproj", "{AD4EE9E6-F4A3-4139-AF05-71388167DE5B}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Bbs.SqlSugarCore", "module\bbs\Yi.Framework.Bbs.SqlSugarCore\Yi.Framework.Bbs.SqlSugarCore.csproj", "{6C86BA71-9F87-4E2C-B467-2950D77DCDFA}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "audit-logging", "audit-logging", "{73CCF2C4-B9FD-44AB-8D4B-0A421805B094}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.AuditLogging.SqlSugarCore", "module\audit-logging\Yi.Framework.AuditLogging.SqlSugarCore\Yi.Framework.AuditLogging.SqlSugarCore.csproj", "{48806510-8E18-4E1E-9BAF-5B97E88C5FC3}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.AspNetCore.Authentication.OAuth", "framework\Yi.Framework.AspNetCore.Authentication.OAuth\Yi.Framework.AspNetCore.Authentication.OAuth.csproj", "{791AC2FA-50D3-4408-8D68-31DA72F608BE}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{01300F0F-686E-47B3-821D-12424177867B}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Web", "sample\Acme.BookStore.Web\Acme.BookStore.Web.csproj", "{576DBC97-4E5D-4444-B65C-F41649A5F8E0}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Domain.Shared", "sample\Acme.BookStore.Domain.Shared\Acme.BookStore.Domain.Shared.csproj", "{D7F8BD42-F6A2-4F0A-9212-391B5185A99D}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Domain", "sample\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj", "{B615847F-8568-41D1-8B7E-63D61AE69F3D}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Application.Contracts", "sample\Acme.BookStore.Application.Contracts\Acme.BookStore.Application.Contracts.csproj", "{20827DB5-5CDE-491A-82E8-3CAB82618C1E}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Application", "sample\Acme.BookStore.Application\Acme.BookStore.Application.csproj", "{320273B6-7AE3-42DA-9675-D9AD4928A289}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.SqlSugarCore", "sample\Acme.BookStore.SqlSugarCore\Acme.BookStore.SqlSugarCore.csproj", "{70CCBD89-C0A1-4AC8-9AFA-C86C356DFDD7}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Test", "test\Yi.Abp.Test\Yi.Abp.Test.csproj", "{68627BC2-F049-4C69-AD17-81DF9478E8CE}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tenant-management", "tenant-management", "{499A8C71-7892-42D0-A77E-48756E1EFF16}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.TenantManagement.SqlSugarCore", "module\tenant-management\Yi.Framework.TenantManagement.SqlSugarCore\Yi.Framework.TenantManagement.SqlSugarCore.csproj", "{FA5BBAA1-08DC-472F-BB2C-5314E59D1556}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.TenantManagement.Domain", "module\tenant-management\Yi.Framework.TenantManagement.Domain\Yi.Framework.TenantManagement.Domain.csproj", "{54D8E2BC-591C-4344-A58E-874D49C00B41}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.AuditLogging.Domain", "module\audit-logging\Yi.Framework.AuditLogging.Domain\Yi.Framework.AuditLogging.Domain.csproj", "{EFD13211-17B5-400A-B99A-9F6F4E520C1E}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.AuditLogging.Domain.Shared", "module\audit-logging\Yi.Framework.AuditLogging.Domain.Shared\Yi.Framework.AuditLogging.Domain.Shared.csproj", "{9C8C3C53-3DCE-4516-867E-228858E61B26}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.TenantManagement.Application", "module\tenant-management\Yi.Framework.TenantManagement.Application\Yi.Framework.TenantManagement.Application.csproj", "{17816837-E53B-486B-B796-53C601FE6CD9}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.TenantManagement.Application.Contracts", "module\tenant-management\Yi.Framework.TenantManagement.Application.Contracts\Yi.Framework.TenantManagement.Application.Contracts.csproj", "{FA735055-CBDD-4EFD-B84B-85810DA1425E}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "code-gen", "code-gen", "{4FFE7212-21F2-476D-B628-3C65E6C5075E}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Application", "module\code-gen\Yi.Framework.CodeGen.Application\Yi.Framework.CodeGen.Application.csproj", "{97EC40D7-DBFA-467A-98CB-221AF27B14F2}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Application.Contracts", "module\code-gen\Yi.Framework.CodeGen.Application.Contracts\Yi.Framework.CodeGen.Application.Contracts.csproj", "{882BC563-2F75-4B95-AC96-F4BF23F5E69D}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Domain", "module\code-gen\Yi.Framework.CodeGen.Domain\Yi.Framework.CodeGen.Domain.csproj", "{85CB8517-2B80-42D8-B954-081079AC9BA0}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Domain.Shared", "module\code-gen\Yi.Framework.CodeGen.Domain.Shared\Yi.Framework.CodeGen.Domain.Shared.csproj", "{EEFF0F05-2709-4151-A8CE-667935CEAE0B}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Caching.FreeRedis", "framework\Yi.Framework.Caching.FreeRedis\Yi.Framework.Caching.FreeRedis.csproj", "{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.SqlSugarCore", "module\code-gen\Yi.Framework.CodeGen.SqlSugarCore\Yi.Framework.CodeGen.SqlSugarCore.csproj", "{FB09ACC2-A27D-4D87-8D85-1435FDED4D04}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "client", "client", "{8B27846A-043D-4F2F-8140-5CEC9D1863B5}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.HttpApi.Client", "client\Yi.Abp.HttpApi.Client\Yi.Abp.HttpApi.Client.csproj", "{6B554DCC-3A81-4624-9141-4E39365ADA35}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Client.Console", "client\Yi.Abp.Client.Console\Yi.Abp.Client.Console.csproj", "{2D23B44A-DFA3-4C36-8516-4F5AE442403C}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Client.WebApi", "client\Yi.Abp.Client.WebApi\Yi.Abp.Client.WebApi.csproj", "{00E49781-C6A0-491C-86A1-46F685C90915}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setting-management", "setting-management", "{8C68059E-F3B1-4D28-A1C9-A5830F53E5D3}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.SettingManagement.Domain", "module\setting-management\Yi.Framework.SettingManagement.Domain\Yi.Framework.SettingManagement.Domain.csproj", "{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.SettingManagement.SqlSugarCore", "module\setting-management\Yi.Framework.SettingManagement.SqlSugarCore\Yi.Framework.SettingManagement.SqlSugarCore.csproj", "{495C4643-39D4-46E7-BDC8-237589627BE4}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "chat-hub", "chat-hub", "{D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.ChatHub.Application.Contracts", "module\chat-hub\Yi.Framework.ChatHub.Application.Contracts\Yi.Framework.ChatHub.Application.Contracts.csproj", "{65D4D033-5504-44B9-B152-0172ACD64CE6}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.ChatHub.Domain.Shared", "module\chat-hub\Yi.Framework.ChatHub.Domain.Shared\Yi.Framework.ChatHub.Domain.Shared.csproj", "{DEEC0B15-190C-4464-B469-C45C6563C592}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.ChatHub.SqlSugarCore", "module\chat-hub\Yi.Framework.ChatHub.SqlSugarCore\Yi.Framework.ChatHub.SqlSugarCore.csproj", "{E476D266-8FB2-4D6B-AE2B-F0D279D4264E}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.ChatHub.Domain", "module\chat-hub\Yi.Framework.ChatHub.Domain\Yi.Framework.ChatHub.Domain.csproj", "{C2DCA2FD-BFB4-4E76-967B-0AF8CC4F4D47}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.ChatHub.Application", "module\chat-hub\Yi.Framework.ChatHub.Application\Yi.Framework.ChatHub.Application.csproj", "{B7A1A8F3-CFA6-4ECF-A707-0F33FE0A6F1D}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.Test", "test\Yi.Framework.Rbac.Test\Yi.Framework.Rbac.Test.csproj", "{9ECF0841-53BE-4FD8-95D1-A7223C7F3A07}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tool", "tool", "{084CBEEC-5D37-4716-B9C7-D80D6960DFF4}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Tool", "tool\Yi.Abp.Tool\Yi.Abp.Tool.csproj", "{4FEBBDD9-E4F4-4BAF-8599-E2D57C08A74F}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Tool.Web", "tool\Yi.Abp.Tool.Web\Yi.Abp.Tool.Web.csproj", "{2CE51D4C-1EF9-462B-BA14-7EA01A7E4AF1}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Tool.Application", "tool\Yi.Abp.Tool.Application\Yi.Abp.Tool.Application.csproj", "{776590BA-B900-4C8B-986A-5B721FA4B306}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Tool.Application.Contracts", "tool\Yi.Abp.Tool.Application.Contracts\Yi.Abp.Tool.Application.Contracts.csproj", "{3A3AF1ED-FC7F-48CF-8ACE-9D50426B4675}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Tool.Domain", "tool\Yi.Abp.Tool.Domain\Yi.Abp.Tool.Domain.csproj", "{68F73B7B-0F8A-41C1-8092-6D6FFAED32F8}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Tool.Domain.Shared", "tool\Yi.Abp.Tool.Domain.Shared\Yi.Abp.Tool.Domain.Shared.csproj", "{4AE84CDE-2A47-4D68-8E93-86193F72E4E8}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Tool.HttpApi.Client", "tool\Yi.Abp.Tool.HttpApi.Client\Yi.Abp.Tool.HttpApi.Client.csproj", "{C8F97775-D903-4365-A4FF-3DA97E318CD2}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.SettingManagement.Application", "module\setting-management\Yi.Framework.SettingManagement.Application\Yi.Framework.SettingManagement.Application.csproj", "{2A31D7CB-BDCC-4253-BA73-273B6B5E1956}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{15913E44-DA92-44B9-9AC5-E9457EA34BF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{15913E44-DA92-44B9-9AC5-E9457EA34BF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{15913E44-DA92-44B9-9AC5-E9457EA34BF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{15913E44-DA92-44B9-9AC5-E9457EA34BF5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{DC431ECC-C75D-4B01-8B79-4861948179BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{DC431ECC-C75D-4B01-8B79-4861948179BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{DC431ECC-C75D-4B01-8B79-4861948179BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{DC431ECC-C75D-4B01-8B79-4861948179BB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{9A7BBA40-28D6-4900-9E1D-D627A516EE72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{9A7BBA40-28D6-4900-9E1D-D627A516EE72}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9A7BBA40-28D6-4900-9E1D-D627A516EE72}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{9A7BBA40-28D6-4900-9E1D-D627A516EE72}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{746DBBD6-23E8-4D5D-9D23-E2902BE338BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{746DBBD6-23E8-4D5D-9D23-E2902BE338BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{746DBBD6-23E8-4D5D-9D23-E2902BE338BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{746DBBD6-23E8-4D5D-9D23-E2902BE338BD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{51EEBF59-3D37-4681-981D-56F8D8F8968D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{51EEBF59-3D37-4681-981D-56F8D8F8968D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{51EEBF59-3D37-4681-981D-56F8D8F8968D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{51EEBF59-3D37-4681-981D-56F8D8F8968D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{7B15C198-538A-44ED-A6AA-3A0FEAA1D2BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{7B15C198-538A-44ED-A6AA-3A0FEAA1D2BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7B15C198-538A-44ED-A6AA-3A0FEAA1D2BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{7B15C198-538A-44ED-A6AA-3A0FEAA1D2BD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{F4D5A496-BFBE-470B-A05B-CB5823B47E72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{F4D5A496-BFBE-470B-A05B-CB5823B47E72}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{F4D5A496-BFBE-470B-A05B-CB5823B47E72}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{F4D5A496-BFBE-470B-A05B-CB5823B47E72}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{FD6D6860-3753-4747-8A26-977E4A3001F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{FD6D6860-3753-4747-8A26-977E4A3001F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{FD6D6860-3753-4747-8A26-977E4A3001F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{FD6D6860-3753-4747-8A26-977E4A3001F9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{ECE874D4-F882-4EF4-84A6-A842D9B8FBC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{ECE874D4-F882-4EF4-84A6-A842D9B8FBC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{ECE874D4-F882-4EF4-84A6-A842D9B8FBC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{ECE874D4-F882-4EF4-84A6-A842D9B8FBC5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1995A019-C8AE-467E-B427-ED57D6CBF44F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1995A019-C8AE-467E-B427-ED57D6CBF44F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1995A019-C8AE-467E-B427-ED57D6CBF44F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1995A019-C8AE-467E-B427-ED57D6CBF44F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{F5011C0D-209B-4A98-BBE3-68157503EEF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{F5011C0D-209B-4A98-BBE3-68157503EEF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{F5011C0D-209B-4A98-BBE3-68157503EEF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{F5011C0D-209B-4A98-BBE3-68157503EEF8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{0A8296A3-C11F-4F13-8E49-6BC8188D4804}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{0A8296A3-C11F-4F13-8E49-6BC8188D4804}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{0A8296A3-C11F-4F13-8E49-6BC8188D4804}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{0A8296A3-C11F-4F13-8E49-6BC8188D4804}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{F0141C17-0EBD-4261-98D5-1C5B7BC1DFEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{F0141C17-0EBD-4261-98D5-1C5B7BC1DFEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{F0141C17-0EBD-4261-98D5-1C5B7BC1DFEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{F0141C17-0EBD-4261-98D5-1C5B7BC1DFEE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1C360956-8CD8-407E-B87F-D0BD57068EB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1C360956-8CD8-407E-B87F-D0BD57068EB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1C360956-8CD8-407E-B87F-D0BD57068EB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1C360956-8CD8-407E-B87F-D0BD57068EB9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{4F02B08D-5FE2-460D-BCA5-DA565151AE30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{4F02B08D-5FE2-460D-BCA5-DA565151AE30}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{4F02B08D-5FE2-460D-BCA5-DA565151AE30}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{4F02B08D-5FE2-460D-BCA5-DA565151AE30}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{C04D3F71-1557-46D0-B810-97B1FBB6AB73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{C04D3F71-1557-46D0-B810-97B1FBB6AB73}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{C04D3F71-1557-46D0-B810-97B1FBB6AB73}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{C04D3F71-1557-46D0-B810-97B1FBB6AB73}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{A2BB899D-4F9A-4184-81BD-94B938E2AB03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A2BB899D-4F9A-4184-81BD-94B938E2AB03}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A2BB899D-4F9A-4184-81BD-94B938E2AB03}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A2BB899D-4F9A-4184-81BD-94B938E2AB03}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{4503A2F9-139D-4CBC-AF11-689C34F0D77B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{4503A2F9-139D-4CBC-AF11-689C34F0D77B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{4503A2F9-139D-4CBC-AF11-689C34F0D77B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{4503A2F9-139D-4CBC-AF11-689C34F0D77B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{EB9349E2-256D-41EB-A345-21635A1361B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{EB9349E2-256D-41EB-A345-21635A1361B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{EB9349E2-256D-41EB-A345-21635A1361B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{EB9349E2-256D-41EB-A345-21635A1361B3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{AD4EE9E6-F4A3-4139-AF05-71388167DE5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{AD4EE9E6-F4A3-4139-AF05-71388167DE5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{AD4EE9E6-F4A3-4139-AF05-71388167DE5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{AD4EE9E6-F4A3-4139-AF05-71388167DE5B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{6C86BA71-9F87-4E2C-B467-2950D77DCDFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{6C86BA71-9F87-4E2C-B467-2950D77DCDFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{6C86BA71-9F87-4E2C-B467-2950D77DCDFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{6C86BA71-9F87-4E2C-B467-2950D77DCDFA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{48806510-8E18-4E1E-9BAF-5B97E88C5FC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{48806510-8E18-4E1E-9BAF-5B97E88C5FC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{48806510-8E18-4E1E-9BAF-5B97E88C5FC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{48806510-8E18-4E1E-9BAF-5B97E88C5FC3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{791AC2FA-50D3-4408-8D68-31DA72F608BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{791AC2FA-50D3-4408-8D68-31DA72F608BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{791AC2FA-50D3-4408-8D68-31DA72F608BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{791AC2FA-50D3-4408-8D68-31DA72F608BE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{576DBC97-4E5D-4444-B65C-F41649A5F8E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{576DBC97-4E5D-4444-B65C-F41649A5F8E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{576DBC97-4E5D-4444-B65C-F41649A5F8E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{576DBC97-4E5D-4444-B65C-F41649A5F8E0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{D7F8BD42-F6A2-4F0A-9212-391B5185A99D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D7F8BD42-F6A2-4F0A-9212-391B5185A99D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D7F8BD42-F6A2-4F0A-9212-391B5185A99D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{D7F8BD42-F6A2-4F0A-9212-391B5185A99D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{B615847F-8568-41D1-8B7E-63D61AE69F3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B615847F-8568-41D1-8B7E-63D61AE69F3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B615847F-8568-41D1-8B7E-63D61AE69F3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B615847F-8568-41D1-8B7E-63D61AE69F3D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{20827DB5-5CDE-491A-82E8-3CAB82618C1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{20827DB5-5CDE-491A-82E8-3CAB82618C1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{20827DB5-5CDE-491A-82E8-3CAB82618C1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{20827DB5-5CDE-491A-82E8-3CAB82618C1E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{320273B6-7AE3-42DA-9675-D9AD4928A289}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{320273B6-7AE3-42DA-9675-D9AD4928A289}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{320273B6-7AE3-42DA-9675-D9AD4928A289}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{320273B6-7AE3-42DA-9675-D9AD4928A289}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{70CCBD89-C0A1-4AC8-9AFA-C86C356DFDD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{70CCBD89-C0A1-4AC8-9AFA-C86C356DFDD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{70CCBD89-C0A1-4AC8-9AFA-C86C356DFDD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{70CCBD89-C0A1-4AC8-9AFA-C86C356DFDD7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{68627BC2-F049-4C69-AD17-81DF9478E8CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{68627BC2-F049-4C69-AD17-81DF9478E8CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{68627BC2-F049-4C69-AD17-81DF9478E8CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{68627BC2-F049-4C69-AD17-81DF9478E8CE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{FA5BBAA1-08DC-472F-BB2C-5314E59D1556}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{FA5BBAA1-08DC-472F-BB2C-5314E59D1556}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{FA5BBAA1-08DC-472F-BB2C-5314E59D1556}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{FA5BBAA1-08DC-472F-BB2C-5314E59D1556}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{54D8E2BC-591C-4344-A58E-874D49C00B41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{54D8E2BC-591C-4344-A58E-874D49C00B41}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{54D8E2BC-591C-4344-A58E-874D49C00B41}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{54D8E2BC-591C-4344-A58E-874D49C00B41}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{EFD13211-17B5-400A-B99A-9F6F4E520C1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{EFD13211-17B5-400A-B99A-9F6F4E520C1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{EFD13211-17B5-400A-B99A-9F6F4E520C1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{EFD13211-17B5-400A-B99A-9F6F4E520C1E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{9C8C3C53-3DCE-4516-867E-228858E61B26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{9C8C3C53-3DCE-4516-867E-228858E61B26}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9C8C3C53-3DCE-4516-867E-228858E61B26}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{9C8C3C53-3DCE-4516-867E-228858E61B26}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{17816837-E53B-486B-B796-53C601FE6CD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{17816837-E53B-486B-B796-53C601FE6CD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{17816837-E53B-486B-B796-53C601FE6CD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{17816837-E53B-486B-B796-53C601FE6CD9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{FA735055-CBDD-4EFD-B84B-85810DA1425E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{FA735055-CBDD-4EFD-B84B-85810DA1425E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{FA735055-CBDD-4EFD-B84B-85810DA1425E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{FA735055-CBDD-4EFD-B84B-85810DA1425E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{97EC40D7-DBFA-467A-98CB-221AF27B14F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{97EC40D7-DBFA-467A-98CB-221AF27B14F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{97EC40D7-DBFA-467A-98CB-221AF27B14F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{97EC40D7-DBFA-467A-98CB-221AF27B14F2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{882BC563-2F75-4B95-AC96-F4BF23F5E69D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{882BC563-2F75-4B95-AC96-F4BF23F5E69D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{882BC563-2F75-4B95-AC96-F4BF23F5E69D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{882BC563-2F75-4B95-AC96-F4BF23F5E69D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{85CB8517-2B80-42D8-B954-081079AC9BA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{85CB8517-2B80-42D8-B954-081079AC9BA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{85CB8517-2B80-42D8-B954-081079AC9BA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{85CB8517-2B80-42D8-B954-081079AC9BA0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{EEFF0F05-2709-4151-A8CE-667935CEAE0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{EEFF0F05-2709-4151-A8CE-667935CEAE0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{EEFF0F05-2709-4151-A8CE-667935CEAE0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{EEFF0F05-2709-4151-A8CE-667935CEAE0B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{FB09ACC2-A27D-4D87-8D85-1435FDED4D04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{FB09ACC2-A27D-4D87-8D85-1435FDED4D04}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{FB09ACC2-A27D-4D87-8D85-1435FDED4D04}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{FB09ACC2-A27D-4D87-8D85-1435FDED4D04}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{6B554DCC-3A81-4624-9141-4E39365ADA35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{6B554DCC-3A81-4624-9141-4E39365ADA35}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{6B554DCC-3A81-4624-9141-4E39365ADA35}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{6B554DCC-3A81-4624-9141-4E39365ADA35}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2D23B44A-DFA3-4C36-8516-4F5AE442403C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{2D23B44A-DFA3-4C36-8516-4F5AE442403C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{2D23B44A-DFA3-4C36-8516-4F5AE442403C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2D23B44A-DFA3-4C36-8516-4F5AE442403C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{00E49781-C6A0-491C-86A1-46F685C90915}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{00E49781-C6A0-491C-86A1-46F685C90915}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{00E49781-C6A0-491C-86A1-46F685C90915}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{00E49781-C6A0-491C-86A1-46F685C90915}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{495C4643-39D4-46E7-BDC8-237589627BE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{495C4643-39D4-46E7-BDC8-237589627BE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{495C4643-39D4-46E7-BDC8-237589627BE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{495C4643-39D4-46E7-BDC8-237589627BE4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{65D4D033-5504-44B9-B152-0172ACD64CE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{65D4D033-5504-44B9-B152-0172ACD64CE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{65D4D033-5504-44B9-B152-0172ACD64CE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{65D4D033-5504-44B9-B152-0172ACD64CE6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{DEEC0B15-190C-4464-B469-C45C6563C592}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{DEEC0B15-190C-4464-B469-C45C6563C592}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{DEEC0B15-190C-4464-B469-C45C6563C592}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{DEEC0B15-190C-4464-B469-C45C6563C592}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{E476D266-8FB2-4D6B-AE2B-F0D279D4264E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{E476D266-8FB2-4D6B-AE2B-F0D279D4264E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{E476D266-8FB2-4D6B-AE2B-F0D279D4264E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{E476D266-8FB2-4D6B-AE2B-F0D279D4264E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{C2DCA2FD-BFB4-4E76-967B-0AF8CC4F4D47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{C2DCA2FD-BFB4-4E76-967B-0AF8CC4F4D47}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{C2DCA2FD-BFB4-4E76-967B-0AF8CC4F4D47}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{C2DCA2FD-BFB4-4E76-967B-0AF8CC4F4D47}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{B7A1A8F3-CFA6-4ECF-A707-0F33FE0A6F1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B7A1A8F3-CFA6-4ECF-A707-0F33FE0A6F1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B7A1A8F3-CFA6-4ECF-A707-0F33FE0A6F1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B7A1A8F3-CFA6-4ECF-A707-0F33FE0A6F1D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{9ECF0841-53BE-4FD8-95D1-A7223C7F3A07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{9ECF0841-53BE-4FD8-95D1-A7223C7F3A07}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9ECF0841-53BE-4FD8-95D1-A7223C7F3A07}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{9ECF0841-53BE-4FD8-95D1-A7223C7F3A07}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{4FEBBDD9-E4F4-4BAF-8599-E2D57C08A74F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{4FEBBDD9-E4F4-4BAF-8599-E2D57C08A74F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{4FEBBDD9-E4F4-4BAF-8599-E2D57C08A74F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{4FEBBDD9-E4F4-4BAF-8599-E2D57C08A74F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2CE51D4C-1EF9-462B-BA14-7EA01A7E4AF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{2CE51D4C-1EF9-462B-BA14-7EA01A7E4AF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{2CE51D4C-1EF9-462B-BA14-7EA01A7E4AF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2CE51D4C-1EF9-462B-BA14-7EA01A7E4AF1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{776590BA-B900-4C8B-986A-5B721FA4B306}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{776590BA-B900-4C8B-986A-5B721FA4B306}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{776590BA-B900-4C8B-986A-5B721FA4B306}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{776590BA-B900-4C8B-986A-5B721FA4B306}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{3A3AF1ED-FC7F-48CF-8ACE-9D50426B4675}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{3A3AF1ED-FC7F-48CF-8ACE-9D50426B4675}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{3A3AF1ED-FC7F-48CF-8ACE-9D50426B4675}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{3A3AF1ED-FC7F-48CF-8ACE-9D50426B4675}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{68F73B7B-0F8A-41C1-8092-6D6FFAED32F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{68F73B7B-0F8A-41C1-8092-6D6FFAED32F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{68F73B7B-0F8A-41C1-8092-6D6FFAED32F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{68F73B7B-0F8A-41C1-8092-6D6FFAED32F8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{4AE84CDE-2A47-4D68-8E93-86193F72E4E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{4AE84CDE-2A47-4D68-8E93-86193F72E4E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{4AE84CDE-2A47-4D68-8E93-86193F72E4E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{4AE84CDE-2A47-4D68-8E93-86193F72E4E8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{C8F97775-D903-4365-A4FF-3DA97E318CD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{C8F97775-D903-4365-A4FF-3DA97E318CD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{C8F97775-D903-4365-A4FF-3DA97E318CD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{C8F97775-D903-4365-A4FF-3DA97E318CD2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2A31D7CB-BDCC-4253-BA73-273B6B5E1956}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{2A31D7CB-BDCC-4253-BA73-273B6B5E1956}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{2A31D7CB-BDCC-4253-BA73-273B6B5E1956}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2A31D7CB-BDCC-4253-BA73-273B6B5E1956}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{15913E44-DA92-44B9-9AC5-E9457EA34BF5} = {B782C78B-6C17-49E6-A237-3383BA720766}
|
||||||
|
{DC431ECC-C75D-4B01-8B79-4861948179BB} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
|
||||||
|
{9A7BBA40-28D6-4900-9E1D-D627A516EE72} = {B782C78B-6C17-49E6-A237-3383BA720766}
|
||||||
|
{746DBBD6-23E8-4D5D-9D23-E2902BE338BD} = {B782C78B-6C17-49E6-A237-3383BA720766}
|
||||||
|
{51EEBF59-3D37-4681-981D-56F8D8F8968D} = {B782C78B-6C17-49E6-A237-3383BA720766}
|
||||||
|
{7B15C198-538A-44ED-A6AA-3A0FEAA1D2BD} = {B782C78B-6C17-49E6-A237-3383BA720766}
|
||||||
|
{F4D5A496-BFBE-470B-A05B-CB5823B47E72} = {B782C78B-6C17-49E6-A237-3383BA720766}
|
||||||
|
{FD6D6860-3753-4747-8A26-977E4A3001F9} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
|
||||||
|
{ECE874D4-F882-4EF4-84A6-A842D9B8FBC5} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
|
||||||
|
{1995A019-C8AE-467E-B427-ED57D6CBF44F} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
|
||||||
|
{F5011C0D-209B-4A98-BBE3-68157503EEF8} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
|
||||||
|
{0A8296A3-C11F-4F13-8E49-6BC8188D4804} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
|
||||||
|
{F0141C17-0EBD-4261-98D5-1C5B7BC1DFEE} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
|
||||||
|
{9CC7A457-1236-40BA-B47B-E7B710A3F061} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
|
||||||
|
{1C360956-8CD8-407E-B87F-D0BD57068EB9} = {9CC7A457-1236-40BA-B47B-E7B710A3F061}
|
||||||
|
{4F02B08D-5FE2-460D-BCA5-DA565151AE30} = {9CC7A457-1236-40BA-B47B-E7B710A3F061}
|
||||||
|
{C04D3F71-1557-46D0-B810-97B1FBB6AB73} = {9CC7A457-1236-40BA-B47B-E7B710A3F061}
|
||||||
|
{A2BB899D-4F9A-4184-81BD-94B938E2AB03} = {9CC7A457-1236-40BA-B47B-E7B710A3F061}
|
||||||
|
{4503A2F9-139D-4CBC-AF11-689C34F0D77B} = {9CC7A457-1236-40BA-B47B-E7B710A3F061}
|
||||||
|
{E902A945-4F41-4E96-A0DA-9F66CDA22261} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
|
||||||
|
{EB9349E2-256D-41EB-A345-21635A1361B3} = {E902A945-4F41-4E96-A0DA-9F66CDA22261}
|
||||||
|
{4EABBC84-BCED-46C1-8CF1-62A7B8081ED7} = {E902A945-4F41-4E96-A0DA-9F66CDA22261}
|
||||||
|
{7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20} = {E902A945-4F41-4E96-A0DA-9F66CDA22261}
|
||||||
|
{AD4EE9E6-F4A3-4139-AF05-71388167DE5B} = {E902A945-4F41-4E96-A0DA-9F66CDA22261}
|
||||||
|
{6C86BA71-9F87-4E2C-B467-2950D77DCDFA} = {E902A945-4F41-4E96-A0DA-9F66CDA22261}
|
||||||
|
{73CCF2C4-B9FD-44AB-8D4B-0A421805B094} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
|
||||||
|
{48806510-8E18-4E1E-9BAF-5B97E88C5FC3} = {73CCF2C4-B9FD-44AB-8D4B-0A421805B094}
|
||||||
|
{791AC2FA-50D3-4408-8D68-31DA72F608BE} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
|
||||||
|
{576DBC97-4E5D-4444-B65C-F41649A5F8E0} = {01300F0F-686E-47B3-821D-12424177867B}
|
||||||
|
{D7F8BD42-F6A2-4F0A-9212-391B5185A99D} = {01300F0F-686E-47B3-821D-12424177867B}
|
||||||
|
{B615847F-8568-41D1-8B7E-63D61AE69F3D} = {01300F0F-686E-47B3-821D-12424177867B}
|
||||||
|
{20827DB5-5CDE-491A-82E8-3CAB82618C1E} = {01300F0F-686E-47B3-821D-12424177867B}
|
||||||
|
{320273B6-7AE3-42DA-9675-D9AD4928A289} = {01300F0F-686E-47B3-821D-12424177867B}
|
||||||
|
{70CCBD89-C0A1-4AC8-9AFA-C86C356DFDD7} = {01300F0F-686E-47B3-821D-12424177867B}
|
||||||
|
{68627BC2-F049-4C69-AD17-81DF9478E8CE} = {0D10EEF2-FBAE-4C72-B816-A52823FC299B}
|
||||||
|
{499A8C71-7892-42D0-A77E-48756E1EFF16} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
|
||||||
|
{FA5BBAA1-08DC-472F-BB2C-5314E59D1556} = {499A8C71-7892-42D0-A77E-48756E1EFF16}
|
||||||
|
{54D8E2BC-591C-4344-A58E-874D49C00B41} = {499A8C71-7892-42D0-A77E-48756E1EFF16}
|
||||||
|
{EFD13211-17B5-400A-B99A-9F6F4E520C1E} = {73CCF2C4-B9FD-44AB-8D4B-0A421805B094}
|
||||||
|
{9C8C3C53-3DCE-4516-867E-228858E61B26} = {73CCF2C4-B9FD-44AB-8D4B-0A421805B094}
|
||||||
|
{17816837-E53B-486B-B796-53C601FE6CD9} = {499A8C71-7892-42D0-A77E-48756E1EFF16}
|
||||||
|
{FA735055-CBDD-4EFD-B84B-85810DA1425E} = {499A8C71-7892-42D0-A77E-48756E1EFF16}
|
||||||
|
{4FFE7212-21F2-476D-B628-3C65E6C5075E} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
|
||||||
|
{97EC40D7-DBFA-467A-98CB-221AF27B14F2} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
|
||||||
|
{882BC563-2F75-4B95-AC96-F4BF23F5E69D} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
|
||||||
|
{85CB8517-2B80-42D8-B954-081079AC9BA0} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
|
||||||
|
{EEFF0F05-2709-4151-A8CE-667935CEAE0B} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
|
||||||
|
{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
|
||||||
|
{FB09ACC2-A27D-4D87-8D85-1435FDED4D04} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
|
||||||
|
{6B554DCC-3A81-4624-9141-4E39365ADA35} = {8B27846A-043D-4F2F-8140-5CEC9D1863B5}
|
||||||
|
{2D23B44A-DFA3-4C36-8516-4F5AE442403C} = {8B27846A-043D-4F2F-8140-5CEC9D1863B5}
|
||||||
|
{00E49781-C6A0-491C-86A1-46F685C90915} = {8B27846A-043D-4F2F-8140-5CEC9D1863B5}
|
||||||
|
{8C68059E-F3B1-4D28-A1C9-A5830F53E5D3} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
|
||||||
|
{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF} = {8C68059E-F3B1-4D28-A1C9-A5830F53E5D3}
|
||||||
|
{495C4643-39D4-46E7-BDC8-237589627BE4} = {8C68059E-F3B1-4D28-A1C9-A5830F53E5D3}
|
||||||
|
{D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
|
||||||
|
{65D4D033-5504-44B9-B152-0172ACD64CE6} = {D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB}
|
||||||
|
{DEEC0B15-190C-4464-B469-C45C6563C592} = {D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB}
|
||||||
|
{E476D266-8FB2-4D6B-AE2B-F0D279D4264E} = {D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB}
|
||||||
|
{C2DCA2FD-BFB4-4E76-967B-0AF8CC4F4D47} = {D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB}
|
||||||
|
{B7A1A8F3-CFA6-4ECF-A707-0F33FE0A6F1D} = {D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB}
|
||||||
|
{9ECF0841-53BE-4FD8-95D1-A7223C7F3A07} = {0D10EEF2-FBAE-4C72-B816-A52823FC299B}
|
||||||
|
{4FEBBDD9-E4F4-4BAF-8599-E2D57C08A74F} = {084CBEEC-5D37-4716-B9C7-D80D6960DFF4}
|
||||||
|
{2CE51D4C-1EF9-462B-BA14-7EA01A7E4AF1} = {084CBEEC-5D37-4716-B9C7-D80D6960DFF4}
|
||||||
|
{776590BA-B900-4C8B-986A-5B721FA4B306} = {084CBEEC-5D37-4716-B9C7-D80D6960DFF4}
|
||||||
|
{3A3AF1ED-FC7F-48CF-8ACE-9D50426B4675} = {084CBEEC-5D37-4716-B9C7-D80D6960DFF4}
|
||||||
|
{68F73B7B-0F8A-41C1-8092-6D6FFAED32F8} = {084CBEEC-5D37-4716-B9C7-D80D6960DFF4}
|
||||||
|
{4AE84CDE-2A47-4D68-8E93-86193F72E4E8} = {084CBEEC-5D37-4716-B9C7-D80D6960DFF4}
|
||||||
|
{C8F97775-D903-4365-A4FF-3DA97E318CD2} = {084CBEEC-5D37-4716-B9C7-D80D6960DFF4}
|
||||||
|
{2A31D7CB-BDCC-4253-BA73-273B6B5E1956} = {8C68059E-F3B1-4D28-A1C9-A5830F53E5D3}
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {23D6FBC9-C970-4641-BC1E-2AEA59F51C18}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
33
Yi.Abp.Net8/client/Yi.Abp.Client.Console/Program.cs
Normal file
33
Yi.Abp.Net8/client/Yi.Abp.Client.Console/Program.cs
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using Yi.Abp.Client.Console;
|
||||||
|
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
IHost host = Host.CreateDefaultBuilder()
|
||||||
|
.ConfigureServices(async (host, service) =>
|
||||||
|
{
|
||||||
|
await service.AddApplicationAsync<YiAbpClientConsoleModule>();
|
||||||
|
})
|
||||||
|
.UseAutofac()
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
//控制台直接调用
|
||||||
|
var account = host.Services.GetRequiredService<IAccountService>();
|
||||||
|
|
||||||
|
//获取验证码
|
||||||
|
var data1 = await account.GetCaptchaImageAsync();
|
||||||
|
|
||||||
|
//登录
|
||||||
|
var data2 = await account.PostLoginAsync(new Yi.Framework.Rbac.Application.Contracts.Dtos.Account.LoginInputVo { UserName = "cc", Password = "123456", Code = string.Empty, Uuid = string.Empty });
|
||||||
|
|
||||||
|
|
||||||
|
host.Run();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine(ex.Message);
|
||||||
|
Console.WriteLine(ex.StackTrace);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||||
|
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Yi.Abp.HttpApi.Client\Yi.Abp.HttpApi.Client.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Yi.Abp.HttpApi.Client;
|
||||||
|
|
||||||
|
namespace Yi.Abp.Client.Console
|
||||||
|
{
|
||||||
|
[DependsOn(typeof(YiAbpHttpApiClientModule))]
|
||||||
|
public class YiAbpClientConsoleModule:AbpModule
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Yi.Framework.Rbac.Application.Contracts.Dtos.Account;
|
||||||
|
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||||
|
|
||||||
|
namespace Yi.Abp.Client.WebApi.Controllers
|
||||||
|
{
|
||||||
|
[ApiController]
|
||||||
|
[Route("[controller]")]
|
||||||
|
public class AccountController : ControllerBase
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
private readonly ILogger<AccountController> _logger;
|
||||||
|
private IAccountService _accountService;
|
||||||
|
public AccountController(ILogger<AccountController> logger, IAccountService accountService)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
_accountService = accountService;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost("my-login")]
|
||||||
|
public async Task<IActionResult> Login(LoginInputVo input)
|
||||||
|
{
|
||||||
|
await _accountService.PostLoginAsync(input);
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[HttpGet("my-captcha-image")]
|
||||||
|
public async Task<IActionResult> CaptchaImageAsync()
|
||||||
|
{
|
||||||
|
var output = await _accountService.GetCaptchaImageAsync();
|
||||||
|
return Ok(output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
28
Yi.Abp.Net8/client/Yi.Abp.Client.WebApi/Program.cs
Normal file
28
Yi.Abp.Net8/client/Yi.Abp.Client.WebApi/Program.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using Autofac.Core;
|
||||||
|
using Yi.Abp.Client.WebApi;
|
||||||
|
|
||||||
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
// Add services to the container.
|
||||||
|
builder.Host.UseAutofac();
|
||||||
|
builder.Services.AddControllers();
|
||||||
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||||
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
|
builder.Services.AddSwaggerGen();
|
||||||
|
await builder.Services.AddApplicationAsync<YiAbpClientWebApiModule>();
|
||||||
|
var app = builder.Build();
|
||||||
|
|
||||||
|
// Configure the HTTP request pipeline.
|
||||||
|
if (app.Environment.IsDevelopment())
|
||||||
|
{
|
||||||
|
app.UseSwagger();
|
||||||
|
app.UseSwaggerUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
app.UseHttpsRedirection();
|
||||||
|
|
||||||
|
app.UseAuthorization();
|
||||||
|
|
||||||
|
app.MapControllers();
|
||||||
|
|
||||||
|
app.Run();
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:35597",
|
||||||
|
"sslPort": 44322
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profiles": {
|
||||||
|
"http": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "swagger",
|
||||||
|
"applicationUrl": "http://localhost:5002",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"https": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "swagger",
|
||||||
|
"applicationUrl": "https://localhost:7108;http://localhost:5002",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "swagger",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Yi.Abp.HttpApi.Client\Yi.Abp.HttpApi.Client.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
@Yi.Abp.Client.WebApi_HostAddress = http://localhost:5002
|
||||||
|
|
||||||
|
GET {{Yi.Abp.Client.WebApi_HostAddress}}/weatherforecast/
|
||||||
|
Accept: application/json
|
||||||
|
|
||||||
|
###
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Yi.Abp.HttpApi.Client;
|
||||||
|
|
||||||
|
namespace Yi.Abp.Client.WebApi
|
||||||
|
{
|
||||||
|
[DependsOn(typeof(YiAbpHttpApiClientModule))]
|
||||||
|
public class YiAbpClientWebApiModule:AbpModule
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
Yi.Abp.Net8/client/Yi.Abp.Client.WebApi/appsettings.json
Normal file
9
Yi.Abp.Net8/client/Yi.Abp.Client.WebApi/appsettings.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowedHosts": "*"
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||||
|
<PackageReference Include="Volo.Abp.Http.Client" Version="$(AbpVersion)" />
|
||||||
|
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\src\Yi.Abp.Application.Contracts\Yi.Abp.Application.Contracts.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Volo.Abp.Autofac;
|
||||||
|
using Volo.Abp.Http.Client;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Yi.Framework.Rbac.Application.Contracts;
|
||||||
|
|
||||||
|
namespace Yi.Abp.HttpApi.Client
|
||||||
|
{
|
||||||
|
[DependsOn(typeof(AbpHttpClientModule),
|
||||||
|
typeof(AbpAutofacModule),
|
||||||
|
|
||||||
|
|
||||||
|
typeof(YiFrameworkRbacApplicationContractsModule))]
|
||||||
|
public class YiAbpHttpApiClientModule : AbpModule
|
||||||
|
{
|
||||||
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
//创建动态客户端代理
|
||||||
|
context.Services.AddHttpClientProxies(
|
||||||
|
typeof(YiFrameworkRbacApplicationContractsModule).Assembly
|
||||||
|
|
||||||
|
);
|
||||||
|
Configure<AbpRemoteServiceOptions>(options =>
|
||||||
|
{
|
||||||
|
options.RemoteServices.Default =
|
||||||
|
new RemoteServiceConfiguration("http://localhost:19001");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
39
Yi.Abp.Net8/common.props
Normal file
39
Yi.Abp.Net8/common.props
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<Project>
|
||||||
|
<Import Project="usings.props" />
|
||||||
|
<Import Project="version.props" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
|
<Version>1.0.0</Version>
|
||||||
|
<NoWarn>$(NoWarn);CS1591;CS8618;CS1998;CS8604;CS8620;CS8600;CS8602</NoWarn>
|
||||||
|
<AbpProjectType>app</AbpProjectType>
|
||||||
|
|
||||||
|
<PublishDocumentationFiles>true</PublishDocumentationFiles>
|
||||||
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="NoWarnOnRazorViewImportedTypeConflicts" BeforeTargets="RazorCoreCompile">
|
||||||
|
<PropertyGroup>
|
||||||
|
<NoWarn>$(NoWarn);0436</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Remove="$(UserProfile)\.nuget\packages\*\*\contentFiles\any\*\*.abppkg*.json" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
3
Yi.Abp.Net8/end.sh
Normal file
3
Yi.Abp.Net8/end.sh
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
kill -9 $(lsof -t -i:19001)
|
||||||
|
echo "Yi-进程已关闭"
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth
|
||||||
|
{
|
||||||
|
public class AuthenticationConstants
|
||||||
|
{
|
||||||
|
public const string OpenId = "urn:openid";
|
||||||
|
public const string AccessToken = "urn:access_token";
|
||||||
|
public const string Name = "urn:name";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Authentication.OAuth;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth
|
||||||
|
{
|
||||||
|
public class AuthenticationOAuthOptions:OAuthOptions
|
||||||
|
{
|
||||||
|
|
||||||
|
public string RedirectUri { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Yi.Framework.AspNetCore.Authentication.OAuth.Gitee;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth
|
||||||
|
{
|
||||||
|
public class AuthticationErrCodeModel
|
||||||
|
{
|
||||||
|
public string error { get; set; }
|
||||||
|
|
||||||
|
public string error_description { get; set; }
|
||||||
|
|
||||||
|
public static void VerifyErrResponse(string content)
|
||||||
|
{
|
||||||
|
|
||||||
|
var model = Newtonsoft.Json.JsonConvert.DeserializeObject<AuthticationErrCodeModel>(content);
|
||||||
|
if (model.error != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
throw new Exception($"第三方授权返回错误,错误码:【{model.error}】,错误详情:【{model.error_description}】");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
|
||||||
|
* for more information concerning the license and the contributors participating to this project.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth.Gitee;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains constants specific to the <see cref="GiteeAuthenticationHandler"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static class GiteeAuthenticationConstants
|
||||||
|
{
|
||||||
|
public static class Claims
|
||||||
|
{
|
||||||
|
public const string Url = "urn:gitee:url";
|
||||||
|
public const string AvatarUrl = "urn:gitee:avatarUrl";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
|
||||||
|
* for more information concerning the license and the contributors participating to this project.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth.Gitee;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default values used by the Gitee authentication middleware.
|
||||||
|
/// </summary>
|
||||||
|
public static class GiteeAuthenticationDefaults
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="AuthenticationScheme.Name"/>.
|
||||||
|
/// </summary>
|
||||||
|
public const string AuthenticationScheme = "Gitee";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="AuthenticationScheme.DisplayName"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string DisplayName = "Gitee";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="AuthenticationSchemeOptions.ClaimsIssuer"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string Issuer = "Gitee";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="RemoteAuthenticationOptions.CallbackPath"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string CallbackPath = "/signin-gitee";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="OAuthOptions.AuthorizationEndpoint"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string AuthorizationEndpoint = "https://gitee.com/oauth/authorize";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="OAuthOptions.TokenEndpoint"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string TokenEndpoint = "https://gitee.com/oauth/token";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="OAuthOptions.UserInformationEndpoint"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string UserInformationEndpoint = "https://gitee.com/api/v5/user";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="GiteeAuthenticationOptions.UserEmailsEndpoint"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string UserEmailsEndpoint = "https://gitee.com/api/v5/emails";
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
|
||||||
|
* for more information concerning the license and the contributors participating to this project.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using JetBrains.Annotations;
|
||||||
|
using Microsoft.AspNetCore.Authentication;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth.Gitee;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Extension methods to add Gitee authentication capabilities to an HTTP application pipeline.
|
||||||
|
/// </summary>
|
||||||
|
public static class GiteeAuthenticationExtensions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Adds <see cref="GiteeAuthenticationHandler"/> to the specified
|
||||||
|
/// <see cref="AuthenticationBuilder"/>, which enables Gitee authentication capabilities.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="builder">The authentication builder.</param>
|
||||||
|
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
|
||||||
|
public static AuthenticationBuilder AddGitee([NotNull] this AuthenticationBuilder builder)
|
||||||
|
{
|
||||||
|
return builder.AddGitee(GiteeAuthenticationDefaults.AuthenticationScheme, options => { });
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds <see cref="GiteeAuthenticationHandler"/> to the specified
|
||||||
|
/// <see cref="AuthenticationBuilder"/>, which enables Gitee authentication capabilities.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="builder">The authentication builder.</param>
|
||||||
|
/// <param name="configuration">The delegate used to configure the OpenID 2.0 options.</param>
|
||||||
|
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
|
||||||
|
public static AuthenticationBuilder AddGitee(
|
||||||
|
[NotNull] this AuthenticationBuilder builder,
|
||||||
|
[NotNull] Action<GiteeAuthenticationOptions> configuration)
|
||||||
|
{
|
||||||
|
return builder.AddGitee(GiteeAuthenticationDefaults.AuthenticationScheme, configuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds <see cref="GiteeAuthenticationHandler"/> to the specified
|
||||||
|
/// <see cref="AuthenticationBuilder"/>, which enables Gitee authentication capabilities.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="builder">The authentication builder.</param>
|
||||||
|
/// <param name="scheme">The authentication scheme associated with this instance.</param>
|
||||||
|
/// <param name="configuration">The delegate used to configure the Gitee options.</param>
|
||||||
|
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
|
||||||
|
public static AuthenticationBuilder AddGitee(
|
||||||
|
[NotNull] this AuthenticationBuilder builder,
|
||||||
|
[NotNull] string scheme,
|
||||||
|
[NotNull] Action<GiteeAuthenticationOptions> configuration)
|
||||||
|
{
|
||||||
|
return builder.AddGitee(scheme, GiteeAuthenticationDefaults.DisplayName, configuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds <see cref="GiteeAuthenticationHandler"/> to the specified
|
||||||
|
/// <see cref="AuthenticationBuilder"/>, which enables Gitee authentication capabilities.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="builder">The authentication builder.</param>
|
||||||
|
/// <param name="scheme">The authentication scheme associated with this instance.</param>
|
||||||
|
/// <param name="caption">The optional display name associated with this instance.</param>
|
||||||
|
/// <param name="configuration">The delegate used to configure the Gitee options.</param>
|
||||||
|
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
|
||||||
|
public static AuthenticationBuilder AddGitee(
|
||||||
|
[NotNull] this AuthenticationBuilder builder,
|
||||||
|
[NotNull] string scheme,
|
||||||
|
[CanBeNull] string caption,
|
||||||
|
[NotNull] Action<GiteeAuthenticationOptions> configuration)
|
||||||
|
{
|
||||||
|
return builder.AddScheme<GiteeAuthenticationOptions, GiteeAuthenticationHandler>(scheme, caption, configuration);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
using System.Security.Claims;
|
||||||
|
using System.Text.Encodings.Web;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using static Yi.Framework.AspNetCore.Authentication.OAuth.Gitee.GiteeAuthenticationConstants;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth.Gitee
|
||||||
|
{
|
||||||
|
public class GiteeAuthenticationHandler : OauthAuthenticationHandler<GiteeAuthenticationOptions>
|
||||||
|
{
|
||||||
|
public GiteeAuthenticationHandler(IOptionsMonitor<GiteeAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, IHttpClientFactory httpClientFactory) : base(options, logger, encoder, httpClientFactory)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string AuthenticationSchemeNmae => GiteeAuthenticationDefaults.AuthenticationScheme;
|
||||||
|
|
||||||
|
protected override async Task<List<Claim>> GetAuthTicketAsync(string code)
|
||||||
|
{
|
||||||
|
//获取 accessToken
|
||||||
|
var tokenQueryKv = new List<KeyValuePair<string, string?>>()
|
||||||
|
{
|
||||||
|
new KeyValuePair<string, string?>("grant_type","authorization_code"),
|
||||||
|
new KeyValuePair<string, string?>("client_id",Options.ClientId),
|
||||||
|
new KeyValuePair<string, string?>("client_secret",Options.ClientSecret),
|
||||||
|
new KeyValuePair<string, string?>("redirect_uri",Options.RedirectUri),
|
||||||
|
new KeyValuePair<string, string?>("code",code)
|
||||||
|
};
|
||||||
|
var tokenModel = await SendHttpRequestAsync<GiteeAuthticationcationTokenResponse>(GiteeAuthenticationDefaults.TokenEndpoint, tokenQueryKv,HttpMethod.Post);
|
||||||
|
|
||||||
|
//获取 userInfo
|
||||||
|
var userInfoQueryKv = new List<KeyValuePair<string, string?>>()
|
||||||
|
{
|
||||||
|
new KeyValuePair<string, string?>("access_token",tokenModel.access_token),
|
||||||
|
};
|
||||||
|
var userInfoMdoel = await SendHttpRequestAsync<GiteeAuthticationcationUserInfoResponse>(GiteeAuthenticationDefaults.UserInformationEndpoint, userInfoQueryKv);
|
||||||
|
|
||||||
|
List<Claim> claims = new List<Claim>()
|
||||||
|
{
|
||||||
|
new Claim(Claims.AvatarUrl, userInfoMdoel.avatar_url),
|
||||||
|
new Claim(Claims.Url, userInfoMdoel.url),
|
||||||
|
|
||||||
|
new Claim(AuthenticationConstants.OpenId,userInfoMdoel.id.ToString()),
|
||||||
|
new Claim(AuthenticationConstants.Name, userInfoMdoel.name),
|
||||||
|
new Claim(AuthenticationConstants.AccessToken, tokenModel.access_token)
|
||||||
|
};
|
||||||
|
return claims;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
|
||||||
|
* for more information concerning the license and the contributors participating to this project.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Security.Claims;
|
||||||
|
using Microsoft.AspNetCore.Authentication;
|
||||||
|
using static Yi.Framework.AspNetCore.Authentication.OAuth.Gitee.GiteeAuthenticationConstants;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth.Gitee;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Defines a set of options used by <see cref="GiteeAuthenticationHandler"/>.
|
||||||
|
/// </summary>
|
||||||
|
public class GiteeAuthenticationOptions : AuthenticationOAuthOptions
|
||||||
|
{
|
||||||
|
public GiteeAuthenticationOptions()
|
||||||
|
{
|
||||||
|
ClaimsIssuer = GiteeAuthenticationDefaults.Issuer;
|
||||||
|
|
||||||
|
CallbackPath = GiteeAuthenticationDefaults.CallbackPath;
|
||||||
|
|
||||||
|
AuthorizationEndpoint = GiteeAuthenticationDefaults.AuthorizationEndpoint;
|
||||||
|
TokenEndpoint = GiteeAuthenticationDefaults.TokenEndpoint;
|
||||||
|
UserInformationEndpoint = GiteeAuthenticationDefaults.UserInformationEndpoint;
|
||||||
|
UserEmailsEndpoint = GiteeAuthenticationDefaults.UserEmailsEndpoint;
|
||||||
|
|
||||||
|
Scope.Add("user_info");
|
||||||
|
Scope.Add("emails");
|
||||||
|
|
||||||
|
ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "id");
|
||||||
|
ClaimActions.MapJsonKey(ClaimTypes.Name, "login");
|
||||||
|
ClaimActions.MapJsonKey(ClaimTypes.Email, "email");
|
||||||
|
ClaimActions.MapJsonKey(ClaimTypes.Name, "name");
|
||||||
|
ClaimActions.MapJsonKey(Claims.Url, "url");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the address of the endpoint exposing
|
||||||
|
/// the email addresses associated with the logged in user.
|
||||||
|
/// </summary>
|
||||||
|
public string UserEmailsEndpoint { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth.Gitee
|
||||||
|
{
|
||||||
|
public class GiteeAuthticationcationTokenResponse
|
||||||
|
{
|
||||||
|
public string access_token { get; set; }
|
||||||
|
public string token_type { get; set; }
|
||||||
|
public int expires_in { get; set; }
|
||||||
|
public string refresh_token { get; set; }
|
||||||
|
public string scope { get; set; }
|
||||||
|
public long created_at { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GiteeAuthticationcationOpenIdResponse
|
||||||
|
{
|
||||||
|
public string client_id { get; set; }
|
||||||
|
|
||||||
|
public string openid { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GiteeAuthticationcationUserInfoResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 也可以等于openId
|
||||||
|
/// </summary>
|
||||||
|
public int id { get; set; }
|
||||||
|
public string login { get; set; }
|
||||||
|
public string name { get; set; }
|
||||||
|
public string avatar_url { get; set; }
|
||||||
|
public string url { get; set; }
|
||||||
|
public string html_url { get; set; }
|
||||||
|
public string remark { get; set; }
|
||||||
|
public string followers_url { get; set; }
|
||||||
|
public string following_url { get; set; }
|
||||||
|
public string gists_url { get; set; }
|
||||||
|
public string starred_url { get; set; }
|
||||||
|
public string subscriptions_url { get; set; }
|
||||||
|
public string organizations_url { get; set; }
|
||||||
|
public string repos_url { get; set; }
|
||||||
|
public string events_url { get; set; }
|
||||||
|
public string received_events_url { get; set; }
|
||||||
|
public string type { get; set; }
|
||||||
|
public string blog { get; set; }
|
||||||
|
public string weibo { get; set; }
|
||||||
|
public string bio { get; set; }
|
||||||
|
public int public_repos { get; set; }
|
||||||
|
public int public_gists { get; set; }
|
||||||
|
public int followers { get; set; }
|
||||||
|
public int following { get; set; }
|
||||||
|
public int stared { get; set; }
|
||||||
|
public int watched { get; set; }
|
||||||
|
public DateTime created_at { get; set; }
|
||||||
|
public DateTime updated_at { get; set; }
|
||||||
|
public string email { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
using System.Security.Claims;
|
||||||
|
using System.Text.Encodings.Web;
|
||||||
|
using Microsoft.AspNetCore.Authentication;
|
||||||
|
using Microsoft.AspNetCore.WebUtilities;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth
|
||||||
|
{
|
||||||
|
public abstract class OauthAuthenticationHandler<TOptions> : AuthenticationHandler<TOptions> where TOptions : AuthenticationSchemeOptions, new()
|
||||||
|
{
|
||||||
|
public abstract string AuthenticationSchemeNmae { get; }
|
||||||
|
private AuthenticationScheme _scheme;
|
||||||
|
|
||||||
|
public OauthAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, IHttpClientFactory httpClientFactory) : base(options, logger, encoder)
|
||||||
|
{
|
||||||
|
HttpClientFactory = httpClientFactory;
|
||||||
|
HttpClient = HttpClientFactory.CreateClient();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected IHttpClientFactory HttpClientFactory { get; }
|
||||||
|
|
||||||
|
protected HttpClient HttpClient { get; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生成认证票据
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private AuthenticationTicket TicketConver(List<Claim> claims)
|
||||||
|
{
|
||||||
|
var claimsIdentity = new ClaimsIdentity(claims.ToArray(), AuthenticationSchemeNmae);
|
||||||
|
var principal = new ClaimsPrincipal(claimsIdentity);
|
||||||
|
return new AuthenticationTicket(principal, AuthenticationSchemeNmae);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async Task<HttpModel> SendHttpRequestAsync<HttpModel>(string url, IEnumerable<KeyValuePair<string, string?>> query, HttpMethod? httpMethod = null)
|
||||||
|
{
|
||||||
|
httpMethod = httpMethod ?? HttpMethod.Get;
|
||||||
|
|
||||||
|
var queryUrl = QueryHelpers.AddQueryString(url, query);
|
||||||
|
HttpResponseMessage response = null;
|
||||||
|
if (httpMethod == HttpMethod.Get)
|
||||||
|
{
|
||||||
|
response = await HttpClient.GetAsync(queryUrl);
|
||||||
|
}
|
||||||
|
else if (httpMethod == HttpMethod.Post)
|
||||||
|
{
|
||||||
|
response = await HttpClient.PostAsync(queryUrl, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
var content = await response.Content.ReadAsStringAsync();
|
||||||
|
if (!response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
throw new Exception($"授权服务器请求错误,请求地址:{queryUrl},错误信息:{content}");
|
||||||
|
}
|
||||||
|
VerifyErrResponse(content);
|
||||||
|
var model = Newtonsoft.Json.JsonConvert.DeserializeObject<HttpModel>(content);
|
||||||
|
return model!;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void VerifyErrResponse(string content)
|
||||||
|
{
|
||||||
|
AuthticationErrCodeModel.VerifyErrResponse(content);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract Task<List<Claim>> GetAuthTicketAsync(string code);
|
||||||
|
|
||||||
|
|
||||||
|
protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
|
||||||
|
{
|
||||||
|
if (!Context.Request.Query.ContainsKey("code"))
|
||||||
|
{
|
||||||
|
return AuthenticateResult.Fail("回调未包含code参数");
|
||||||
|
}
|
||||||
|
var code = Context.Request.Query["code"].ToString();
|
||||||
|
|
||||||
|
List<Claim> authTicket = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
authTicket = await GetAuthTicketAsync(code);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
return AuthenticateResult.Fail(ex.Message ?? "未知错误");
|
||||||
|
}
|
||||||
|
//成功
|
||||||
|
var result = AuthenticateResult.Success(TicketConver(authTicket));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
|
||||||
|
* for more information concerning the license and the contributors participating to this project.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth.QQ;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains constants specific to the <see cref="QQAuthenticationHandler"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static class QQAuthenticationConstants
|
||||||
|
{
|
||||||
|
public static class Claims
|
||||||
|
{
|
||||||
|
public const string AvatarFullUrl = "urn:qq:avatar_full";
|
||||||
|
public const string AvatarUrl = "urn:qq:avatar";
|
||||||
|
public const string PictureFullUrl = "urn:qq:picture_full";
|
||||||
|
public const string PictureMediumUrl = "urn:qq:picture_medium";
|
||||||
|
public const string PictureUrl = "urn:qq:picture";
|
||||||
|
public const string UnionId = "urn:qq:unionid";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
|
||||||
|
* for more information concerning the license and the contributors participating to this project.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth.QQ;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default values for QQ authentication.
|
||||||
|
/// </summary>
|
||||||
|
public static class QQAuthenticationDefaults
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="AuthenticationScheme.Name"/>.
|
||||||
|
/// </summary>
|
||||||
|
public const string AuthenticationScheme = "QQ";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="AuthenticationScheme.DisplayName"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string DisplayName = "QQ";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="AuthenticationSchemeOptions.ClaimsIssuer"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string Issuer = "QQ";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="RemoteAuthenticationOptions.CallbackPath"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string CallbackPath = "/signin-qq";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="OAuthOptions.AuthorizationEndpoint"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string AuthorizationEndpoint = "https://graph.qq.com/oauth2.0/authorize";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="OAuthOptions.TokenEndpoint"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string TokenEndpoint = "https://graph.qq.com/oauth2.0/token";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="QQAuthenticationOptions.UserIdentificationEndpoint"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string UserIdentificationEndpoint = "https://graph.qq.com/oauth2.0/me";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default value for <see cref="OAuthOptions.UserInformationEndpoint"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string UserInformationEndpoint = "https://graph.qq.com/user/get_user_info";
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
|
||||||
|
* for more information concerning the license and the contributors participating to this project.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using JetBrains.Annotations;
|
||||||
|
using Microsoft.AspNetCore.Authentication;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth.QQ;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Extension methods to add QQ authentication capabilities to an HTTP application pipeline.
|
||||||
|
/// </summary>
|
||||||
|
public static class QQAuthenticationExtensions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Adds <see cref="QQAuthenticationHandler"/> to the specified
|
||||||
|
/// <see cref="AuthenticationBuilder"/>, which enables QQ authentication capabilities.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="builder">The authentication builder.</param>
|
||||||
|
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
|
||||||
|
public static AuthenticationBuilder AddQQ([NotNull] this AuthenticationBuilder builder)
|
||||||
|
{
|
||||||
|
return builder.AddQQ(QQAuthenticationDefaults.AuthenticationScheme, options => { });
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds <see cref="QQAuthenticationHandler"/> to the specified
|
||||||
|
/// <see cref="AuthenticationBuilder"/>, which enables QQ authentication capabilities.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="builder">The authentication builder.</param>
|
||||||
|
/// <param name="configuration">The delegate used to configure the OpenID 2.0 options.</param>
|
||||||
|
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
|
||||||
|
public static AuthenticationBuilder AddQQ(
|
||||||
|
[NotNull] this AuthenticationBuilder builder,
|
||||||
|
[NotNull] Action<QQAuthenticationOptions> configuration)
|
||||||
|
{
|
||||||
|
return builder.AddQQ(QQAuthenticationDefaults.AuthenticationScheme, configuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds <see cref="QQAuthenticationHandler"/> to the specified
|
||||||
|
/// <see cref="AuthenticationBuilder"/>, which enables QQ authentication capabilities.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="builder">The authentication builder.</param>
|
||||||
|
/// <param name="scheme">The authentication scheme associated with this instance.</param>
|
||||||
|
/// <param name="configuration">The delegate used to configure the QQ options.</param>
|
||||||
|
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
|
||||||
|
public static AuthenticationBuilder AddQQ(
|
||||||
|
[NotNull] this AuthenticationBuilder builder,
|
||||||
|
[NotNull] string scheme,
|
||||||
|
[NotNull] Action<QQAuthenticationOptions> configuration)
|
||||||
|
{
|
||||||
|
return builder.AddQQ(scheme, QQAuthenticationDefaults.DisplayName, configuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds <see cref="QQAuthenticationHandler"/> to the specified
|
||||||
|
/// <see cref="AuthenticationBuilder"/>, which enables QQ authentication capabilities.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="builder">The authentication builder.</param>
|
||||||
|
/// <param name="scheme">The authentication scheme associated with this instance.</param>
|
||||||
|
/// <param name="caption">The optional display name associated with this instance.</param>
|
||||||
|
/// <param name="configuration">The delegate used to configure the QQ options.</param>
|
||||||
|
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
|
||||||
|
public static AuthenticationBuilder AddQQ(
|
||||||
|
[NotNull] this AuthenticationBuilder builder,
|
||||||
|
[NotNull] string scheme,
|
||||||
|
[CanBeNull] string caption,
|
||||||
|
[NotNull] Action<QQAuthenticationOptions> configuration)
|
||||||
|
{
|
||||||
|
return builder.AddScheme<QQAuthenticationOptions, QQAuthenticationHandler>(scheme, caption, configuration);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
using System.Security.Claims;
|
||||||
|
using System.Text.Encodings.Web;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using static Yi.Framework.AspNetCore.Authentication.OAuth.QQ.QQAuthenticationConstants;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth.QQ
|
||||||
|
{
|
||||||
|
public class QQAuthenticationHandler : OauthAuthenticationHandler<QQAuthenticationOptions>
|
||||||
|
{
|
||||||
|
public QQAuthenticationHandler(IOptionsMonitor<QQAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, IHttpClientFactory httpClientFactory) : base(options, logger, encoder, httpClientFactory)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string AuthenticationSchemeNmae => QQAuthenticationDefaults.AuthenticationScheme;
|
||||||
|
|
||||||
|
protected override async Task<List<Claim>> GetAuthTicketAsync(string code)
|
||||||
|
{
|
||||||
|
|
||||||
|
//获取 accessToken
|
||||||
|
var tokenQueryKv = new List<KeyValuePair<string, string?>>()
|
||||||
|
{
|
||||||
|
new KeyValuePair<string, string?>("grant_type","authorization_code"),
|
||||||
|
new KeyValuePair<string, string?>("client_id",Options.ClientId),
|
||||||
|
new KeyValuePair<string, string?>("client_secret",Options.ClientSecret),
|
||||||
|
new KeyValuePair<string, string?>("redirect_uri",Options.RedirectUri),
|
||||||
|
new KeyValuePair<string, string?>("fmt","json"),
|
||||||
|
new KeyValuePair<string, string?>("need_openid","1"),
|
||||||
|
new KeyValuePair<string, string?>("code",code)
|
||||||
|
};
|
||||||
|
var tokenModel = await SendHttpRequestAsync<QQAuthticationcationTokenResponse>(QQAuthenticationDefaults.TokenEndpoint, tokenQueryKv);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//获取 userInfo
|
||||||
|
var userInfoQueryKv = new List<KeyValuePair<string, string?>>()
|
||||||
|
{
|
||||||
|
new KeyValuePair<string, string?>("access_token",tokenModel.access_token),
|
||||||
|
new KeyValuePair<string, string?>("oauth_consumer_key",Options.ClientId),
|
||||||
|
new KeyValuePair<string, string?>("openid",tokenModel.openid),
|
||||||
|
};
|
||||||
|
|
||||||
|
var userInfoMdoel = await SendHttpRequestAsync<QQAuthticationcationUserInfoResponse>(QQAuthenticationDefaults.UserInformationEndpoint, userInfoQueryKv);
|
||||||
|
|
||||||
|
|
||||||
|
List<Claim> claims = new List<Claim>()
|
||||||
|
{
|
||||||
|
|
||||||
|
new Claim(Claims.AvatarFullUrl, userInfoMdoel.figureurl_qq_2),
|
||||||
|
new Claim(Claims.AvatarUrl, userInfoMdoel.figureurl_qq_1),
|
||||||
|
new Claim(Claims.PictureFullUrl, userInfoMdoel.figureurl_2),
|
||||||
|
new Claim(Claims.PictureMediumUrl, userInfoMdoel.figureurl_qq_1),
|
||||||
|
new Claim(Claims.PictureUrl, userInfoMdoel.figureurl),
|
||||||
|
|
||||||
|
new Claim(AuthenticationConstants.OpenId, tokenModel.openid),
|
||||||
|
new Claim(AuthenticationConstants.Name, userInfoMdoel.nickname),
|
||||||
|
new Claim(AuthenticationConstants.AccessToken, tokenModel.access_token),
|
||||||
|
|
||||||
|
};
|
||||||
|
return claims;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
|
||||||
|
* for more information concerning the license and the contributors participating to this project.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Security.Claims;
|
||||||
|
using Microsoft.AspNetCore.Authentication;
|
||||||
|
using static Yi.Framework.AspNetCore.Authentication.OAuth.QQ.QQAuthenticationConstants;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth.QQ;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Defines a set of options used by <see cref="QQAuthenticationHandler"/>.
|
||||||
|
/// </summary>
|
||||||
|
public class QQAuthenticationOptions : AuthenticationOAuthOptions
|
||||||
|
{
|
||||||
|
public QQAuthenticationOptions()
|
||||||
|
{
|
||||||
|
ClaimsIssuer = QQAuthenticationDefaults.Issuer;
|
||||||
|
CallbackPath = QQAuthenticationDefaults.CallbackPath;
|
||||||
|
|
||||||
|
AuthorizationEndpoint = QQAuthenticationDefaults.AuthorizationEndpoint;
|
||||||
|
TokenEndpoint = QQAuthenticationDefaults.TokenEndpoint;
|
||||||
|
UserIdentificationEndpoint = QQAuthenticationDefaults.UserIdentificationEndpoint;
|
||||||
|
UserInformationEndpoint = QQAuthenticationDefaults.UserInformationEndpoint;
|
||||||
|
|
||||||
|
Scope.Add("get_user_info");
|
||||||
|
|
||||||
|
ClaimActions.MapJsonKey(ClaimTypes.Name, "nickname");
|
||||||
|
ClaimActions.MapJsonKey(ClaimTypes.Gender, "gender");
|
||||||
|
ClaimActions.MapJsonKey(Claims.PictureUrl, "figureurl");
|
||||||
|
ClaimActions.MapJsonKey(Claims.PictureMediumUrl, "figureurl_1");
|
||||||
|
ClaimActions.MapJsonKey(Claims.PictureFullUrl, "figureurl_2");
|
||||||
|
ClaimActions.MapJsonKey(Claims.AvatarUrl, "figureurl_qq_1");
|
||||||
|
ClaimActions.MapJsonKey(Claims.AvatarFullUrl, "figureurl_qq_2");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets if the union Id (the primary key of an owner for different apps of the QQ platform) should be put into the user claims.
|
||||||
|
/// </summary>
|
||||||
|
public bool ApplyForUnionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the URL of the user identification endpoint (a.k.a. the "OpenID endpoint").
|
||||||
|
/// </summary>
|
||||||
|
public string UserIdentificationEndpoint { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth.QQ
|
||||||
|
{
|
||||||
|
public class QQAuthticationcationTokenResponse
|
||||||
|
{
|
||||||
|
public string access_token { get; set; }
|
||||||
|
|
||||||
|
public string expires_in { get; set; }
|
||||||
|
|
||||||
|
public string refresh_token { get; set; }
|
||||||
|
|
||||||
|
public string openid { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class QQAuthticationcationOpenIdResponse
|
||||||
|
{
|
||||||
|
public string client_id { get; set; }
|
||||||
|
|
||||||
|
public string openid { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class QQAuthticationcationUserInfoResponse
|
||||||
|
{
|
||||||
|
// 返回码
|
||||||
|
public int ret { get; set; }
|
||||||
|
|
||||||
|
// 如果ret<0,会有相应的错误信息提示
|
||||||
|
// 返回数据全部用UTF-8编码
|
||||||
|
public string msg { get; set; }
|
||||||
|
|
||||||
|
// 判断是否有数据丢失
|
||||||
|
// 0或者不返回:没有数据丢失,可以缓存
|
||||||
|
// 1:有部分数据丢失或错误,不要缓存
|
||||||
|
public int is_lost { get; set; }
|
||||||
|
|
||||||
|
// 用户在QQ空间的昵称
|
||||||
|
public string nickname { get; set; }
|
||||||
|
|
||||||
|
// 大小为30x30像素的QQ空间头像URL
|
||||||
|
public string figureurl { get; set; }
|
||||||
|
|
||||||
|
// 大小为50x50像素的QQ空间头像URL
|
||||||
|
public string figureurl_1 { get; set; }
|
||||||
|
|
||||||
|
// 大小为100x100像素的QQ空间头像URL
|
||||||
|
public string figureurl_2 { get; set; }
|
||||||
|
|
||||||
|
// 大小为40x40像素的QQ头像URL
|
||||||
|
public string figureurl_qq_1 { get; set; }
|
||||||
|
|
||||||
|
// 大小为100x100像素的QQ头像URL
|
||||||
|
// 需要注意,不是所有的用户都拥有QQ的100x100的头像,但40x40像素则是一定会有
|
||||||
|
public string figureurl_qq_2 { get; set; }
|
||||||
|
|
||||||
|
// 性别。如果获取不到则默认返回"男"
|
||||||
|
public string gender { get; set; }
|
||||||
|
|
||||||
|
// 性别类型。默认返回2
|
||||||
|
public int gender_type { get; set; }
|
||||||
|
|
||||||
|
// 省
|
||||||
|
public string province { get; set; }
|
||||||
|
|
||||||
|
// 市
|
||||||
|
public string city { get; set; }
|
||||||
|
|
||||||
|
// 年
|
||||||
|
public int year { get; set; }
|
||||||
|
|
||||||
|
// 星座
|
||||||
|
public string constellation { get; set; }
|
||||||
|
|
||||||
|
// 标识用户是否为黄钻用户
|
||||||
|
public int is_yellow_vip { get; set; }
|
||||||
|
|
||||||
|
// 黄钻等级
|
||||||
|
public int yellow_vip_level { get; set; }
|
||||||
|
|
||||||
|
// 是否为年费黄钻用户
|
||||||
|
public int is_yellow_year_vip { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Yi.Framework.AspNetCore\Yi.Framework.AspNetCore.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Yi.Framework.Core;
|
||||||
|
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Authentication.OAuth
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 本模块轮子来自 AspNet.Security.OAuth.QQ;
|
||||||
|
/// </summary>
|
||||||
|
[DependsOn(typeof(YiFrameworkAspNetCoreModule))]
|
||||||
|
public class YiFrameworkAspNetCoreAuthenticationOAuthModule:AbpModule
|
||||||
|
{
|
||||||
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
var service = context.Services;
|
||||||
|
service.AddHttpClient();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using JetBrains.Annotations;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Yi.Framework.AspNetCore.Microsoft.AspNetCore.Middlewares;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Microsoft.AspNetCore.Builder
|
||||||
|
{
|
||||||
|
public static class ApiInfoBuilderExtensions
|
||||||
|
{
|
||||||
|
public static IApplicationBuilder UseYiApiHandlinge([NotNull] this IApplicationBuilder app)
|
||||||
|
{
|
||||||
|
app.UseMiddleware<ApiInfoMiddleware>();
|
||||||
|
return app;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,25 +1,24 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Swashbuckle.AspNetCore.SwaggerUI;
|
using Volo.Abp.AspNetCore.Mvc;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AspNetCore.Microsoft.AspNetCore.Builder
|
namespace Yi.Framework.AspNetCore.Microsoft.AspNetCore.Builder
|
||||||
{
|
{
|
||||||
public static class SwaggerUseExtensons
|
public static class SwaggerBuilderExtensons
|
||||||
{
|
{
|
||||||
public static IApplicationBuilder UseSwaggerServer(this IApplicationBuilder app, params SwaggerModel[] swaggerModels)
|
public static IApplicationBuilder UseYiSwagger(this IApplicationBuilder app, params SwaggerModel[] swaggerModels)
|
||||||
{
|
{
|
||||||
|
var mvcOptions = app.ApplicationServices.GetRequiredService<IOptions<AbpAspNetCoreMvcOptions>>().Value;
|
||||||
|
|
||||||
app.UseSwagger();
|
app.UseSwagger();
|
||||||
app.UseSwaggerUI(c =>
|
app.UseSwaggerUI(c =>
|
||||||
{
|
{
|
||||||
if (swaggerModels.Length == 0)
|
foreach (var setting in mvcOptions.ConventionalControllers.ConventionalControllerSettings)
|
||||||
|
{
|
||||||
|
c.SwaggerEndpoint($"/swagger/{setting.RemoteServiceName}/swagger.json", setting.RemoteServiceName);
|
||||||
|
}
|
||||||
|
if (mvcOptions.ConventionalControllers.ConventionalControllerSettings.Count==0&&swaggerModels.Length == 0)
|
||||||
{
|
{
|
||||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Yi.Framework");
|
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Yi.Framework");
|
||||||
}
|
}
|
||||||
@@ -27,7 +26,6 @@ namespace AspNetCore.Microsoft.AspNetCore.Builder
|
|||||||
{
|
{
|
||||||
foreach (var k in swaggerModels)
|
foreach (var k in swaggerModels)
|
||||||
{
|
{
|
||||||
|
|
||||||
c.SwaggerEndpoint(k.Url, k.Name);
|
c.SwaggerEndpoint(k.Url, k.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
|
using System.Net.Http;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
using Volo.Abp.Json;
|
||||||
|
using Yi.Framework.Core.Extensions;
|
||||||
|
using static System.Net.WebRequestMethods;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Microsoft.AspNetCore.Middlewares
|
||||||
|
{
|
||||||
|
[DebuggerStepThrough]
|
||||||
|
public class ApiInfoMiddleware : IMiddleware, ITransientDependency
|
||||||
|
{
|
||||||
|
|
||||||
|
public async Task InvokeAsync(HttpContext context, RequestDelegate next)
|
||||||
|
{
|
||||||
|
context.Response.OnStarting([DebuggerStepThrough] () =>
|
||||||
|
{
|
||||||
|
if (context.Response.StatusCode == StatusCodes.Status200OK
|
||||||
|
&& context.Response.Headers["Content-Type"].ToString() == "application/vnd.ms-excel")
|
||||||
|
{
|
||||||
|
context.FileAttachmentHandle($"{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx");
|
||||||
|
}
|
||||||
|
if (context.Response.StatusCode == StatusCodes.Status200OK &&
|
||||||
|
context.Response.Headers["Content-Type"].ToString() == "application/x-zip-compressed")
|
||||||
|
{
|
||||||
|
context.FileAttachmentHandle($"{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.zip");
|
||||||
|
}
|
||||||
|
return Task.CompletedTask;
|
||||||
|
});
|
||||||
|
|
||||||
|
await next(context);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Text;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
using Microsoft.AspNetCore.Mvc.Controllers;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Microsoft.OpenApi.Any;
|
||||||
|
using Microsoft.OpenApi.Models;
|
||||||
|
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||||
|
using Volo.Abp.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection
|
||||||
|
{
|
||||||
|
public static class SwaggerAddExtensions
|
||||||
|
{
|
||||||
|
public static IServiceCollection AddYiSwaggerGen<Program>(this IServiceCollection services, Action<SwaggerGenOptions>? action=null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var serviceProvider = services.BuildServiceProvider();
|
||||||
|
var mvcOptions = serviceProvider.GetRequiredService<IOptions<AbpAspNetCoreMvcOptions>>();
|
||||||
|
|
||||||
|
var mvcSettings = mvcOptions.Value.ConventionalControllers.ConventionalControllerSettings.DistinctBy(x => x.RemoteServiceName);
|
||||||
|
|
||||||
|
|
||||||
|
services.AddAbpSwaggerGen(
|
||||||
|
options =>
|
||||||
|
{
|
||||||
|
if (action is not null)
|
||||||
|
{
|
||||||
|
action.Invoke(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 配置分组,还需要去重,支持重写,如果外部传入后,将以外部为准
|
||||||
|
foreach (var setting in mvcSettings.OrderBy(x => x.RemoteServiceName))
|
||||||
|
{
|
||||||
|
if (!options.SwaggerGeneratorOptions.SwaggerDocs.ContainsKey(setting.RemoteServiceName))
|
||||||
|
{
|
||||||
|
options.SwaggerDoc(setting.RemoteServiceName, new OpenApiInfo { Title = setting.RemoteServiceName, Version = "v1" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据分组名称过滤 API 文档
|
||||||
|
options.DocInclusionPredicate((docName, apiDesc) =>
|
||||||
|
{
|
||||||
|
if (apiDesc.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor)
|
||||||
|
{
|
||||||
|
var settingOrNull = mvcSettings.Where(x => x.Assembly == controllerActionDescriptor.ControllerTypeInfo.Assembly).FirstOrDefault();
|
||||||
|
if (settingOrNull is not null)
|
||||||
|
{
|
||||||
|
return docName == settingOrNull.RemoteServiceName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
options.CustomSchemaIds(type => type.FullName);
|
||||||
|
var basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
|
||||||
|
if (basePath is not null)
|
||||||
|
{
|
||||||
|
foreach (var item in Directory.GetFiles(basePath, "*.xml"))
|
||||||
|
{
|
||||||
|
options.IncludeXmlComments(item, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
options.AddSecurityDefinition("JwtBearer", new OpenApiSecurityScheme()
|
||||||
|
{
|
||||||
|
Description = "直接输入Token即可",
|
||||||
|
Name = "Authorization",
|
||||||
|
In = ParameterLocation.Header,
|
||||||
|
Type = SecuritySchemeType.Http,
|
||||||
|
Scheme = "bearer"
|
||||||
|
});
|
||||||
|
var scheme = new OpenApiSecurityScheme()
|
||||||
|
{
|
||||||
|
Reference = new OpenApiReference() { Type = ReferenceType.SecurityScheme, Id = "JwtBearer" }
|
||||||
|
};
|
||||||
|
options.AddSecurityRequirement(new OpenApiSecurityRequirement()
|
||||||
|
{
|
||||||
|
[scheme] = new string[0]
|
||||||
|
});
|
||||||
|
|
||||||
|
options.OperationFilter<AddRequiredHeaderParameter>();
|
||||||
|
options.SchemaFilter<EnumSchemaFilter>();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Swagger文档枚举字段显示枚举属性和枚举值,以及枚举描述
|
||||||
|
/// </summary>
|
||||||
|
public class EnumSchemaFilter : ISchemaFilter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 实现接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
|
||||||
|
public void Apply(OpenApiSchema model, SchemaFilterContext context)
|
||||||
|
{
|
||||||
|
if (context.Type.IsEnum)
|
||||||
|
{
|
||||||
|
model.Enum.Clear();
|
||||||
|
model.Type = "string";
|
||||||
|
model.Format = null;
|
||||||
|
|
||||||
|
|
||||||
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
|
Enum.GetNames(context.Type)
|
||||||
|
.ToList()
|
||||||
|
.ForEach(name =>
|
||||||
|
{
|
||||||
|
Enum e = (Enum)Enum.Parse(context.Type, name);
|
||||||
|
var descrptionOrNull = GetEnumDescription(e);
|
||||||
|
model.Enum.Add(new OpenApiString(name));
|
||||||
|
stringBuilder.Append($"【枚举:{name}{(descrptionOrNull is null ? string.Empty : $"({descrptionOrNull})")}={Convert.ToInt64(Enum.Parse(context.Type, name))}】<br />");
|
||||||
|
});
|
||||||
|
model.Description= stringBuilder.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string? GetEnumDescription(Enum value)
|
||||||
|
{
|
||||||
|
var fieldInfo = value.GetType().GetField(value.ToString());
|
||||||
|
var attributes = (DescriptionAttribute[])fieldInfo.GetCustomAttributes(typeof(DescriptionAttribute), false);
|
||||||
|
return attributes.Length > 0 ? attributes[0].Description : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class AddRequiredHeaderParameter : IOperationFilter
|
||||||
|
{
|
||||||
|
public static string HeaderKey { get; set; } = "__tenant";
|
||||||
|
public void Apply(OpenApiOperation operation, OperationFilterContext context)
|
||||||
|
{
|
||||||
|
if (operation.Parameters == null)
|
||||||
|
operation.Parameters = new List<OpenApiParameter>();
|
||||||
|
operation.Parameters.Add(new OpenApiParameter
|
||||||
|
{
|
||||||
|
Name = HeaderKey,
|
||||||
|
In = ParameterLocation.Header,
|
||||||
|
Required = false,
|
||||||
|
AllowEmptyValue = true,
|
||||||
|
Description="租户id或者租户名称(可空为默认租户)"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
using JetBrains.Annotations;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ApplicationModels;
|
||||||
|
using System.Reflection;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Volo.Abp.AspNetCore.Mvc.Conventions;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
using Volo.Abp.Reflection;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Mvc
|
||||||
|
{
|
||||||
|
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
|
||||||
|
[ExposeServices(typeof(IConventionalRouteBuilder))]
|
||||||
|
public class YiConventionalRouteBuilder : ConventionalRouteBuilder
|
||||||
|
{
|
||||||
|
public YiConventionalRouteBuilder(IOptions<AbpConventionalControllerOptions> options) : base(options)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public override string Build(
|
||||||
|
string rootPath,
|
||||||
|
string controllerName,
|
||||||
|
ActionModel action,
|
||||||
|
string httpMethod,
|
||||||
|
[CanBeNull] ConventionalControllerSetting configuration)
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiRoutePrefix = GetApiRoutePrefix(action, configuration);
|
||||||
|
var controllerNameInUrl =
|
||||||
|
NormalizeUrlControllerName(rootPath, controllerName, action, httpMethod, configuration);
|
||||||
|
|
||||||
|
var url = $"{rootPath}/{NormalizeControllerNameCase(controllerNameInUrl, configuration)}";
|
||||||
|
|
||||||
|
//Add {id} path if needed
|
||||||
|
var idParameterModel = action.Parameters.FirstOrDefault(p => p.ParameterName == "id");
|
||||||
|
if (idParameterModel != null)
|
||||||
|
{
|
||||||
|
if (TypeHelper.IsPrimitiveExtended(idParameterModel.ParameterType, includeEnums: true))
|
||||||
|
{
|
||||||
|
url += "/{id}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var properties = idParameterModel
|
||||||
|
.ParameterType
|
||||||
|
.GetProperties(BindingFlags.Instance | BindingFlags.Public);
|
||||||
|
|
||||||
|
foreach (var property in properties)
|
||||||
|
{
|
||||||
|
url += "/{" + NormalizeIdPropertyNameCase(property, configuration) + "}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Add action name if needed
|
||||||
|
var actionNameInUrl = NormalizeUrlActionName(rootPath, controllerName, action, httpMethod, configuration);
|
||||||
|
if (!actionNameInUrl.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
url += $"/{NormalizeActionNameCase(actionNameInUrl, configuration)}";
|
||||||
|
|
||||||
|
//Add secondary Id
|
||||||
|
var secondaryIds = action.Parameters
|
||||||
|
.Where(p => p.ParameterName.EndsWith("Id", StringComparison.Ordinal)).ToList();
|
||||||
|
if (secondaryIds.Count == 1)
|
||||||
|
{
|
||||||
|
url += $"/{{{NormalizeSecondaryIdNameCase(secondaryIds[0], configuration)}}}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
using JetBrains.Annotations;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ActionConstraints;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ApplicationModels;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Volo.Abp;
|
||||||
|
using Volo.Abp.AspNetCore;
|
||||||
|
using Volo.Abp.AspNetCore.Mvc;
|
||||||
|
using Volo.Abp.AspNetCore.Mvc.Conventions;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
using Volo.Abp.Reflection;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore.Mvc
|
||||||
|
{
|
||||||
|
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
|
||||||
|
[ExposeServices(typeof(IAbpServiceConvention))]
|
||||||
|
public class YiServiceConvention : AbpServiceConvention
|
||||||
|
{
|
||||||
|
public YiServiceConvention(IOptions<AbpAspNetCoreMvcOptions> options, IConventionalRouteBuilder conventionalRouteBuilder) : base(options, conventionalRouteBuilder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void ConfigureSelector(string rootPath, string controllerName, ActionModel action, ConventionalControllerSetting? configuration)
|
||||||
|
{
|
||||||
|
RemoveEmptySelectors(action.Selectors);
|
||||||
|
|
||||||
|
var remoteServiceAtt = ReflectionHelper.GetSingleAttributeOrDefault<RemoteServiceAttribute>(action.ActionMethod);
|
||||||
|
if (remoteServiceAtt != null && !remoteServiceAtt.IsEnabledFor(action.ActionMethod))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!action.Selectors.Any())
|
||||||
|
{
|
||||||
|
AddAbpServiceSelector(rootPath, controllerName, action, configuration);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NormalizeSelectorRoutes(rootPath, controllerName, action, configuration);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override void AddAbpServiceSelector(string rootPath, string controllerName, ActionModel action, ConventionalControllerSetting? configuration)
|
||||||
|
{
|
||||||
|
base.AddAbpServiceSelector(rootPath, controllerName, action, configuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void NormalizeSelectorRoutes(string rootPath, string controllerName, ActionModel action, ConventionalControllerSetting? configuration)
|
||||||
|
{
|
||||||
|
foreach (var selector in action.Selectors)
|
||||||
|
{
|
||||||
|
var httpMethod = selector.ActionConstraints
|
||||||
|
.OfType<HttpMethodActionConstraint>()
|
||||||
|
.FirstOrDefault()?
|
||||||
|
.HttpMethods?
|
||||||
|
.FirstOrDefault();
|
||||||
|
|
||||||
|
if (httpMethod == null)
|
||||||
|
{
|
||||||
|
httpMethod = SelectHttpMethod(action, configuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selector.AttributeRouteModel == null)
|
||||||
|
{
|
||||||
|
selector.AttributeRouteModel = CreateAbpServiceAttributeRouteModel(rootPath, controllerName, action, httpMethod, configuration);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
var template = selector.AttributeRouteModel.Template;
|
||||||
|
if (!template.StartsWith("/"))
|
||||||
|
{
|
||||||
|
var route = $"{rootPath}/{template}";
|
||||||
|
selector.AttributeRouteModel.Template = route;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!selector.ActionConstraints.OfType<HttpMethodActionConstraint>().Any())
|
||||||
|
{
|
||||||
|
selector.ActionConstraints.Add(new HttpMethodActionConstraint(new[] { httpMethod }));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
namespace Yi.Framework.AspNetCore
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
public class RemoteServiceSuccessInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new instance of <see cref="RemoteServiceSuccessInfo"/>.
|
||||||
|
/// </summary>
|
||||||
|
public RemoteServiceSuccessInfo()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new instance of <see cref="RemoteServiceSuccessInfo"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="code">Error code</param>
|
||||||
|
/// <param name="details">Error details</param>
|
||||||
|
/// <param name="message">Error message</param>
|
||||||
|
/// <param name="data">Error data</param>
|
||||||
|
public RemoteServiceSuccessInfo(string message, string? details = null, string? code = null, object? data = null)
|
||||||
|
{
|
||||||
|
Message = message;
|
||||||
|
Details = details;
|
||||||
|
Code = code;
|
||||||
|
Data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// code.
|
||||||
|
/// </summary>
|
||||||
|
public string? Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// message.
|
||||||
|
/// </summary>
|
||||||
|
public string? Message { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// details.
|
||||||
|
/// </summary>
|
||||||
|
public string? Details { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// data.
|
||||||
|
/// </summary>
|
||||||
|
public object? Data { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="Cors\**" />
|
||||||
|
<EmbeddedResource Remove="Cors\**" />
|
||||||
|
<None Remove="Cors\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.Json" Version="$(AbpVersion)" />
|
||||||
|
<PackageReference Include="Volo.Abp.Swashbuckle" Version="$(AbpVersion)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Yi.Framework.Core\Yi.Framework.Core.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ApiExplorer;
|
||||||
|
using Microsoft.AspNetCore.Mvc.Controllers;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Microsoft.OpenApi.Models;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||||
|
using Volo.Abp;
|
||||||
|
using Volo.Abp.AspNetCore.Mvc;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Yi.Framework.AspNetCore.Mvc;
|
||||||
|
using Yi.Framework.Core;
|
||||||
|
|
||||||
|
namespace Yi.Framework.AspNetCore
|
||||||
|
{
|
||||||
|
[DependsOn(typeof(YiFrameworkCoreModule)
|
||||||
|
)]
|
||||||
|
public class YiFrameworkAspNetCoreModule : AbpModule
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using FreeRedis;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Caching.FreeRedis
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 便于转到定义
|
||||||
|
/// </summary>
|
||||||
|
public class FreeSqlOptions: ConnectionStringBuilder
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="FreeRedis" Version="1.2.14" />
|
||||||
|
<PackageReference Include="FreeRedis.DistributedCache" Version="1.2.5" />
|
||||||
|
<PackageReference Include="Volo.Abp.Caching" Version="$(AbpVersion)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Volo.Abp.Caching;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Caching.FreeRedis
|
||||||
|
{
|
||||||
|
[Dependency(ReplaceServices =true)]
|
||||||
|
public class YiDistributedCacheKeyNormalizer : IDistributedCacheKeyNormalizer, ITransientDependency
|
||||||
|
{
|
||||||
|
protected ICurrentTenant CurrentTenant { get; }
|
||||||
|
|
||||||
|
protected AbpDistributedCacheOptions DistributedCacheOptions { get; }
|
||||||
|
|
||||||
|
public YiDistributedCacheKeyNormalizer(
|
||||||
|
ICurrentTenant currentTenant,
|
||||||
|
IOptions<AbpDistributedCacheOptions> distributedCacheOptions)
|
||||||
|
{
|
||||||
|
CurrentTenant = currentTenant;
|
||||||
|
DistributedCacheOptions = distributedCacheOptions.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual string NormalizeKey(DistributedCacheKeyNormalizeArgs args)
|
||||||
|
{
|
||||||
|
var normalizedKey = $"{DistributedCacheOptions.KeyPrefix}{args.Key}";
|
||||||
|
|
||||||
|
//if (!args.IgnoreMultiTenancy && CurrentTenant.Id.HasValue)
|
||||||
|
//{
|
||||||
|
// normalizedKey = $"t:{CurrentTenant.Id.Value},{normalizedKey}";
|
||||||
|
//}
|
||||||
|
|
||||||
|
return normalizedKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using FreeRedis;
|
||||||
|
using Microsoft.Extensions.Caching.Distributed;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
|
using Volo.Abp.Caching;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Caching.FreeRedis
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 此模块得益于FreeRedis作者支持IDistributedCache,使用湿滑
|
||||||
|
/// </summary>
|
||||||
|
[DependsOn(typeof(AbpCachingModule))]
|
||||||
|
public class YiFrameworkCachingFreeRedisModule : AbpModule
|
||||||
|
{
|
||||||
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
|
||||||
|
var configuration = context.Services.GetConfiguration();
|
||||||
|
|
||||||
|
var redisEnabled = configuration["Redis:IsEnabled"];
|
||||||
|
if (redisEnabled.IsNullOrEmpty() || bool.Parse(redisEnabled))
|
||||||
|
{
|
||||||
|
var redisConfiguration = configuration["Redis:Configuration"];
|
||||||
|
RedisClient redisClient = new RedisClient(redisConfiguration);
|
||||||
|
|
||||||
|
context.Services.AddSingleton<IRedisClient>(redisClient);
|
||||||
|
context.Services.Replace(ServiceDescriptor.Singleton<IDistributedCache>(new
|
||||||
|
DistributedCache(redisClient)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Yi.Framework.Data.Entities
|
namespace Yi.Framework.Core.Data
|
||||||
{
|
{
|
||||||
public interface IOrderNum
|
public interface IOrderNum
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Yi.Framework.Data.Entities
|
namespace Yi.Framework.Core.Data
|
||||||
{
|
{
|
||||||
public interface IState
|
public interface IState
|
||||||
{
|
{
|
||||||
@@ -1,12 +1,8 @@
|
|||||||
using Microsoft.AspNetCore.Http;
|
using System.Text;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
|
||||||
namespace Yi.Framework.AspNetCore.Extensions
|
namespace Yi.Framework.Core.Extensions
|
||||||
{
|
{
|
||||||
public static class HttpContextExtensions
|
public static class HttpContextExtensions
|
||||||
{
|
{
|
||||||
@@ -79,7 +75,7 @@ namespace Yi.Framework.AspNetCore.Extensions
|
|||||||
|
|
||||||
result = result.Replace("::ffff:", "127.0.0.1");
|
result = result.Replace("::ffff:", "127.0.0.1");
|
||||||
|
|
||||||
//Ip规则效验
|
//Ip规则校验
|
||||||
var regResult = Regex.IsMatch(result, @"^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$");
|
var regResult = Regex.IsMatch(result, @"^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$");
|
||||||
|
|
||||||
result = regResult ? result : "127.0.0.1";
|
result = regResult ? result : "127.0.0.1";
|
||||||
@@ -95,5 +91,10 @@ namespace Yi.Framework.AspNetCore.Extensions
|
|||||||
{
|
{
|
||||||
return context.Request.Headers["User-Agent"];
|
return context.Request.Headers["User-Agent"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string[]? GetUserPermissions(this HttpContext context, string permissionsName)
|
||||||
|
{
|
||||||
|
return context.User.Claims.Where(x => x.Type == permissionsName).Select(x => x.Value).ToArray();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,12 +26,12 @@ namespace Yi.Framework.Core.Helper
|
|||||||
{
|
{
|
||||||
// get the last piece from the current byte, shift it to the right
|
// get the last piece from the current byte, shift it to the right
|
||||||
// and increment the byte counter
|
// and increment the byte counter
|
||||||
index = (byte)(bytes[currentByte++] >> (hi - 5));
|
index = (byte)(bytes[currentByte++] >> hi - 5);
|
||||||
if (currentByte != bytes.Length)
|
if (currentByte != bytes.Length)
|
||||||
{
|
{
|
||||||
// if we are not at the end, get the first piece from
|
// if we are not at the end, get the first piece from
|
||||||
// the next byte, clear it and shift it to the left
|
// the next byte, clear it and shift it to the left
|
||||||
index = (byte)(((byte)(bytes[currentByte] << (16 - hi)) >> 3) | index);
|
index = (byte)((byte)(bytes[currentByte] << 16 - hi) >> 3 | index);
|
||||||
}
|
}
|
||||||
|
|
||||||
hi -= 3;
|
hi -= 3;
|
||||||
@@ -45,7 +45,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
{
|
{
|
||||||
|
|
||||||
// simply get the stuff from the current byte
|
// simply get the stuff from the current byte
|
||||||
index = (byte)((byte)(bytes[currentByte] << (8 - hi)) >> 3);
|
index = (byte)((byte)(bytes[currentByte] << 8 - hi) >> 3);
|
||||||
hi += 5;
|
hi += 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,13 +59,13 @@ namespace Yi.Framework.Core.Helper
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts a Base32-k string into an array of bytes.
|
/// Converts a Base32-k string into an array of bytes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="System.ArgumentException">
|
/// <exception cref="ArgumentException">
|
||||||
/// Input string <paramref name="s">s</paramref> contains invalid Base32-k characters.
|
/// Input string <paramref name="s">s</paramref> contains invalid Base32-k characters.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static byte[] FromBase32String(string str)
|
public static byte[] FromBase32String(string str)
|
||||||
{
|
{
|
||||||
int numBytes = str.Length * 5 / 8;
|
int numBytes = str.Length * 5 / 8;
|
||||||
byte[] bytes = new Byte[numBytes];
|
byte[] bytes = new byte[numBytes];
|
||||||
|
|
||||||
// all UPPERCASE chars
|
// all UPPERCASE chars
|
||||||
str = str.ToUpper();
|
str = str.ToUpper();
|
||||||
@@ -80,7 +80,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
bit_buffer = (ValidChars.IndexOf(str[0]) | ValidChars.IndexOf(str[1]) << 5);
|
bit_buffer = ValidChars.IndexOf(str[0]) | ValidChars.IndexOf(str[1]) << 5;
|
||||||
bits_in_buffer = 10;
|
bits_in_buffer = 10;
|
||||||
currentCharIndex = 2;
|
currentCharIndex = 2;
|
||||||
for (int i = 0; i < bytes.Length; i++)
|
for (int i = 0; i < bytes.Length; i++)
|
||||||
329
Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ComputerHelper.cs
Normal file
329
Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ComputerHelper.cs
Normal file
@@ -0,0 +1,329 @@
|
|||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Core.Helper
|
||||||
|
{
|
||||||
|
public class ComputerHelper
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 将object转换为long,若转换失败,则返回0。不抛出异常。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="str"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private static long ParseToLong( object obj)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return long.Parse(obj.ToString());
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 将string转换为DateTime,若转换失败,则返回日期最小值。不抛出异常。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="str"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private static DateTime ParseToDateTime( string str)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(str))
|
||||||
|
{
|
||||||
|
return DateTime.MinValue;
|
||||||
|
}
|
||||||
|
if (str.Contains("-") || str.Contains("/"))
|
||||||
|
{
|
||||||
|
return DateTime.Parse(str);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int length = str.Length;
|
||||||
|
switch (length)
|
||||||
|
{
|
||||||
|
case 4:
|
||||||
|
return DateTime.ParseExact(str, "yyyy", System.Globalization.CultureInfo.CurrentCulture);
|
||||||
|
case 6:
|
||||||
|
return DateTime.ParseExact(str, "yyyyMM", System.Globalization.CultureInfo.CurrentCulture);
|
||||||
|
case 8:
|
||||||
|
return DateTime.ParseExact(str, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture);
|
||||||
|
case 10:
|
||||||
|
return DateTime.ParseExact(str, "yyyyMMddHH", System.Globalization.CultureInfo.CurrentCulture);
|
||||||
|
case 12:
|
||||||
|
return DateTime.ParseExact(str, "yyyyMMddHHmm", System.Globalization.CultureInfo.CurrentCulture);
|
||||||
|
case 14:
|
||||||
|
return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);
|
||||||
|
default:
|
||||||
|
return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return DateTime.MinValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static double ParseToDouble(object obj)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return double.Parse(obj.ToString());
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 内存使用情况
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static MemoryMetrics GetComputerInfo()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
MemoryMetricsClient client = new();
|
||||||
|
MemoryMetrics memoryMetrics = IsUnix() ? client.GetUnixMetrics() : client.GetWindowsMetrics();
|
||||||
|
|
||||||
|
memoryMetrics.FreeRam = Math.Round(memoryMetrics.Free / 1024, 2) + "GB";
|
||||||
|
memoryMetrics.UsedRam = Math.Round(memoryMetrics.Used / 1024, 2) + "GB";
|
||||||
|
memoryMetrics.TotalRAM = Math.Round(memoryMetrics.Total / 1024, 2) + "GB";
|
||||||
|
memoryMetrics.RAMRate = Math.Ceiling(100 * memoryMetrics.Used / memoryMetrics.Total).ToString() + "%";
|
||||||
|
memoryMetrics.CPURate = Math.Ceiling(ParseToDouble(GetCPURate())) + "%";
|
||||||
|
return memoryMetrics;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("获取内存使用出错,msg=" + ex.Message + "," + ex.StackTrace);
|
||||||
|
}
|
||||||
|
return new MemoryMetrics();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取内存大小
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<DiskInfo> GetDiskInfos()
|
||||||
|
{
|
||||||
|
List<DiskInfo> diskInfos = new();
|
||||||
|
|
||||||
|
if (IsUnix())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string output = ShellHelper.Bash("df -m / | awk '{print $2,$3,$4,$5,$6}'");
|
||||||
|
var arr = output.Split('\n', StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
if (arr.Length == 0) return diskInfos;
|
||||||
|
|
||||||
|
var rootDisk = arr[1].Split(' ', (char)StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
if (rootDisk == null || rootDisk.Length == 0)
|
||||||
|
{
|
||||||
|
return diskInfos;
|
||||||
|
}
|
||||||
|
DiskInfo diskInfo = new()
|
||||||
|
{
|
||||||
|
DiskName = "/",
|
||||||
|
TotalSize = long.Parse(rootDisk[0]) / 1024,
|
||||||
|
Used = long.Parse(rootDisk[1]) / 1024,
|
||||||
|
AvailableFreeSpace = long.Parse(rootDisk[2]) / 1024,
|
||||||
|
AvailablePercent = decimal.Parse(rootDisk[3].Replace("%", ""))
|
||||||
|
};
|
||||||
|
diskInfos.Add(diskInfo);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("获取磁盘信息出错了" + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var driv = DriveInfo.GetDrives();
|
||||||
|
foreach (var item in driv)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var obj = new DiskInfo()
|
||||||
|
{
|
||||||
|
DiskName = item.Name,
|
||||||
|
TypeName = item.DriveType.ToString(),
|
||||||
|
TotalSize = item.TotalSize / 1024 / 1024 / 1024,
|
||||||
|
AvailableFreeSpace = item.AvailableFreeSpace / 1024 / 1024 / 1024,
|
||||||
|
};
|
||||||
|
obj.Used = obj.TotalSize - obj.AvailableFreeSpace;
|
||||||
|
obj.AvailablePercent = decimal.Ceiling(obj.Used / (decimal)obj.TotalSize * 100);
|
||||||
|
diskInfos.Add(obj);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("获取磁盘信息出错了" + ex.Message);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return diskInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool IsUnix()
|
||||||
|
{
|
||||||
|
var isUnix = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
|
||||||
|
return isUnix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetCPURate()
|
||||||
|
{
|
||||||
|
string cpuRate;
|
||||||
|
if (IsUnix())
|
||||||
|
{
|
||||||
|
string output = ShellHelper.Bash("top -b -n1 | grep \"Cpu(s)\" | awk '{print $2 + $4}'");
|
||||||
|
cpuRate = output.Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string output = ShellHelper.Cmd("wmic", "cpu get LoadPercentage");
|
||||||
|
cpuRate = output.Replace("LoadPercentage", string.Empty).Trim();
|
||||||
|
}
|
||||||
|
return cpuRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取系统运行时间
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string GetRunTime()
|
||||||
|
{
|
||||||
|
string runTime = string.Empty;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (IsUnix())
|
||||||
|
{
|
||||||
|
string output = ShellHelper.Bash("uptime -s").Trim();
|
||||||
|
runTime = DateTimeHelper.FormatTime(ParseToLong((DateTime.Now - ParseToDateTime(output)).TotalMilliseconds.ToString().Split('.')[0]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string output = ShellHelper.Cmd("wmic", "OS get LastBootUpTime/Value");
|
||||||
|
string[] outputArr = output.Split('=', (char)StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
if (outputArr.Length == 2)
|
||||||
|
{
|
||||||
|
runTime = DateTimeHelper.FormatTime(ParseToLong((DateTime.Now - ParseToDateTime( outputArr[1].Split('.')[0])).TotalMilliseconds.ToString().Split('.')[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("获取runTime出错" + ex.Message);
|
||||||
|
}
|
||||||
|
return runTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 内存信息
|
||||||
|
/// </summary>
|
||||||
|
public class MemoryMetrics
|
||||||
|
{
|
||||||
|
[JsonIgnore]
|
||||||
|
public double Total { get; set; }
|
||||||
|
[JsonIgnore]
|
||||||
|
public double Used { get; set; }
|
||||||
|
[JsonIgnore]
|
||||||
|
public double Free { get; set; }
|
||||||
|
|
||||||
|
public string UsedRam { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// CPU使用率%
|
||||||
|
/// </summary>
|
||||||
|
public string CPURate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 总内存 GB
|
||||||
|
/// </summary>
|
||||||
|
public string TotalRAM { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 内存使用率 %
|
||||||
|
/// </summary>
|
||||||
|
public string RAMRate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 空闲内存
|
||||||
|
/// </summary>
|
||||||
|
public string FreeRam { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class DiskInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 磁盘名
|
||||||
|
/// </summary>
|
||||||
|
public string DiskName { get; set; }
|
||||||
|
public string TypeName { get; set; }
|
||||||
|
public long TotalFree { get; set; }
|
||||||
|
public long TotalSize { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 已使用
|
||||||
|
/// </summary>
|
||||||
|
public long Used { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 可使用
|
||||||
|
/// </summary>
|
||||||
|
public long AvailableFreeSpace { get; set; }
|
||||||
|
public decimal AvailablePercent { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class MemoryMetricsClient
|
||||||
|
{
|
||||||
|
#region 获取内存信息
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// windows系统获取内存信息
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public MemoryMetrics GetWindowsMetrics()
|
||||||
|
{
|
||||||
|
string output = ShellHelper.Cmd("wmic", "OS get FreePhysicalMemory,TotalVisibleMemorySize /Value");
|
||||||
|
var metrics = new MemoryMetrics();
|
||||||
|
var lines = output.Trim().Split('\n', (char)StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
|
if (lines.Length <= 0) return metrics;
|
||||||
|
|
||||||
|
var freeMemoryParts = lines[0].Split('=', (char)StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
var totalMemoryParts = lines[1].Split('=', (char)StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
|
metrics.Total = Math.Round(double.Parse(totalMemoryParts[1]) / 1024, 0);
|
||||||
|
metrics.Free = Math.Round(double.Parse(freeMemoryParts[1]) / 1024, 0);//m
|
||||||
|
metrics.Used = metrics.Total - metrics.Free;
|
||||||
|
|
||||||
|
return metrics;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unix系统获取
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public MemoryMetrics GetUnixMetrics()
|
||||||
|
{
|
||||||
|
string output = ShellHelper.Bash("free -m | awk '{print $2,$3,$4,$5,$6}'");
|
||||||
|
var metrics = new MemoryMetrics();
|
||||||
|
var lines = output.Split('\n', (char)StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
|
if (lines.Length <= 0) return metrics;
|
||||||
|
|
||||||
|
if (lines != null && lines.Length > 0)
|
||||||
|
{
|
||||||
|
var memory = lines[1].Split(' ', (char)StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
if (memory.Length >= 3)
|
||||||
|
{
|
||||||
|
metrics.Total = double.Parse(memory[0]);
|
||||||
|
metrics.Used = double.Parse(memory[1]);
|
||||||
|
metrics.Free = double.Parse(memory[2]);//m
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return metrics;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,12 +8,12 @@ namespace Yi.Framework.Core.Helper
|
|||||||
{
|
{
|
||||||
time = time.Substring(0, 10);
|
time = time.Substring(0, 10);
|
||||||
double timestamp = Convert.ToInt64(time);
|
double timestamp = Convert.ToInt64(time);
|
||||||
System.DateTime dateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
|
DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0);
|
||||||
dateTime = dateTime.AddSeconds(timestamp).ToLocalTime();
|
dateTime = dateTime.AddSeconds(timestamp).ToLocalTime();
|
||||||
return dateTime;
|
return dateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string TimeSubTract(DateTime time1,DateTime time2)
|
public static string TimeSubTract(DateTime time1, DateTime time2)
|
||||||
{
|
{
|
||||||
TimeSpan subTract = time1.Subtract(time2);
|
TimeSpan subTract = time1.Subtract(time2);
|
||||||
return $"{subTract.Days} 天 {subTract.Hours} 时 {subTract.Minutes} 分 ";
|
return $"{subTract.Days} 天 {subTract.Hours} 时 {subTract.Minutes} 分 ";
|
||||||
139
Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/DateTimeHelper.cs
Normal file
139
Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/DateTimeHelper.cs
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Core.Helper
|
||||||
|
{
|
||||||
|
public class DateTimeHelper
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dateTime"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static DateTime GetBeginTime(DateTime? dateTime, int days = 0)
|
||||||
|
{
|
||||||
|
if (dateTime == DateTime.MinValue || dateTime == null)
|
||||||
|
{
|
||||||
|
return DateTime.Now.AddDays(days);
|
||||||
|
}
|
||||||
|
return dateTime ?? DateTime.Now;
|
||||||
|
}
|
||||||
|
#region 时间戳转换
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 时间戳转本地时间-时间戳精确到秒
|
||||||
|
/// </summary>
|
||||||
|
public static DateTime ToLocalTimeDateBySeconds(long unix)
|
||||||
|
{
|
||||||
|
var dto = DateTimeOffset.FromUnixTimeSeconds(unix);
|
||||||
|
return dto.ToLocalTime().DateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 时间转时间戳Unix-时间戳精确到秒
|
||||||
|
/// </summary>
|
||||||
|
public static long ToUnixTimestampBySeconds(DateTime dt)
|
||||||
|
{
|
||||||
|
DateTimeOffset dto = new DateTimeOffset(dt);
|
||||||
|
return dto.ToUnixTimeSeconds();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 时间戳转本地时间-时间戳精确到毫秒
|
||||||
|
/// </summary>
|
||||||
|
public static DateTime ToLocalTimeDateByMilliseconds(long unix)
|
||||||
|
{
|
||||||
|
var dto = DateTimeOffset.FromUnixTimeMilliseconds(unix);
|
||||||
|
return dto.ToLocalTime().DateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 时间转时间戳Unix-时间戳精确到毫秒
|
||||||
|
/// </summary>
|
||||||
|
public static long ToUnixTimestampByMilliseconds(DateTime dt)
|
||||||
|
{
|
||||||
|
DateTimeOffset dto = new DateTimeOffset(dt);
|
||||||
|
return dto.ToUnixTimeMilliseconds();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 毫秒转天时分秒
|
||||||
|
/// <summary>
|
||||||
|
/// 毫秒转天时分秒
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ms"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string FormatTime(long ms)
|
||||||
|
{
|
||||||
|
int ss = 1000;
|
||||||
|
int mi = ss * 60;
|
||||||
|
int hh = mi * 60;
|
||||||
|
int dd = hh * 24;
|
||||||
|
|
||||||
|
long day = ms / dd;
|
||||||
|
long hour = (ms - day * dd) / hh;
|
||||||
|
long minute = (ms - day * dd - hour * hh) / mi;
|
||||||
|
long second = (ms - day * dd - hour * hh - minute * mi) / ss;
|
||||||
|
long milliSecond = ms - day * dd - hour * hh - minute * mi - second * ss;
|
||||||
|
|
||||||
|
string sDay = day < 10 ? "0" + day : "" + day; //天
|
||||||
|
string sHour = hour < 10 ? "0" + hour : "" + hour;//小时
|
||||||
|
string sMinute = minute < 10 ? "0" + minute : "" + minute;//分钟
|
||||||
|
string sSecond = second < 10 ? "0" + second : "" + second;//秒
|
||||||
|
string sMilliSecond = milliSecond < 10 ? "0" + milliSecond : "" + milliSecond;//毫秒
|
||||||
|
sMilliSecond = milliSecond < 100 ? "0" + sMilliSecond : "" + sMilliSecond;
|
||||||
|
|
||||||
|
return string.Format("{0} 天 {1} 小时 {2} 分 {3} 秒", sDay, sHour, sMinute, sSecond);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取unix时间戳
|
||||||
|
/// <summary>
|
||||||
|
/// 获取unix时间戳
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static long GetUnixTimeStamp(DateTime dt)
|
||||||
|
{
|
||||||
|
long unixTime = ((DateTimeOffset)dt).ToUnixTimeMilliseconds();
|
||||||
|
return unixTime;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取日期天的最小时间
|
||||||
|
public static DateTime GetDayMinDate(DateTime dt)
|
||||||
|
{
|
||||||
|
DateTime min = new DateTime(dt.Year, dt.Month, dt.Day, 0, 0, 0);
|
||||||
|
return min;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取日期天的最大时间
|
||||||
|
public static DateTime GetDayMaxDate(DateTime dt)
|
||||||
|
{
|
||||||
|
DateTime max = new DateTime(dt.Year, dt.Month, dt.Day, 23, 59, 59);
|
||||||
|
return max;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取日期天的最大时间
|
||||||
|
public static string FormatDateTime(DateTime? dt)
|
||||||
|
{
|
||||||
|
if (dt != null)
|
||||||
|
{
|
||||||
|
if (dt.Value.Year == DateTime.Now.Year)
|
||||||
|
{
|
||||||
|
return dt.Value.ToString("MM-dd HH:mm");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return dt.Value.ToString("yyyy-MM-dd HH:mm");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,16 +12,16 @@ namespace Yi.Framework.Core.Helper
|
|||||||
private Func<T, C> _getField;
|
private Func<T, C> _getField;
|
||||||
public Compare(Func<T, C> getfield)
|
public Compare(Func<T, C> getfield)
|
||||||
{
|
{
|
||||||
this._getField = getfield;
|
_getField = getfield;
|
||||||
}
|
}
|
||||||
public bool Equals(T? x, T? y)
|
public bool Equals(T? x, T? y)
|
||||||
{
|
{
|
||||||
return EqualityComparer<C>.Default.Equals(_getField(x!), _getField(y!));
|
return EqualityComparer<C>.Default.Equals(_getField(x!), _getField(y!));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetHashCode(T obj)
|
public int GetHashCode(T obj)
|
||||||
{
|
{
|
||||||
return EqualityComparer<C>.Default.GetHashCode(this._getField(obj)!);
|
return EqualityComparer<C>.Default.GetHashCode(_getField(obj)!);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static class DistinctHelper
|
public static class DistinctHelper
|
||||||
122
Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/HttpHelper.cs
Normal file
122
Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/HttpHelper.cs
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Net.Mime;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Core.Helper
|
||||||
|
{
|
||||||
|
public static class HttpHelper
|
||||||
|
{
|
||||||
|
|
||||||
|
public static HttpClient Client { get; set; } = new HttpClient();
|
||||||
|
|
||||||
|
public static async Task<string> Get(string url)
|
||||||
|
{
|
||||||
|
return await Client.GetStringAsync(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task<Stream> GetIO(string url)
|
||||||
|
{
|
||||||
|
return await Client.GetStreamAsync(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static async Task<string> Post(string url, object? item = null, Dictionary<string, string>? head = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
using StringContent json = new(JsonSerializer.Serialize(item), Encoding.UTF8, MediaTypeNames.Application.Json);
|
||||||
|
|
||||||
|
|
||||||
|
if (head is not null)
|
||||||
|
{
|
||||||
|
foreach (var d in head)
|
||||||
|
{
|
||||||
|
json.Headers.Add(d.Key, d.Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var httpResponse = await Client.PostAsync(url, json);
|
||||||
|
|
||||||
|
httpResponse.EnsureSuccessStatusCode();
|
||||||
|
|
||||||
|
var content = httpResponse.Content;
|
||||||
|
|
||||||
|
return await content.ReadAsStringAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// public static string HttpGet(string Url, string postDataStr="")
|
||||||
|
// {
|
||||||
|
//#pragma warning disable SYSLIB0014 // 类型或成员已过时
|
||||||
|
// HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url + (postDataStr == "" ? "" : "?") + postDataStr);
|
||||||
|
//#pragma warning restore SYSLIB0014 // 类型或成员已过时
|
||||||
|
// request.Method = "GET";
|
||||||
|
// request.ContentType = "text/html;charset=UTF-8";
|
||||||
|
|
||||||
|
// HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||||
|
// Stream myResponseStream = response.GetResponseStream();
|
||||||
|
// StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8"));
|
||||||
|
// string retString = myStreamReader.ReadToEnd();
|
||||||
|
// myStreamReader.Close();
|
||||||
|
// myResponseStream.Close();
|
||||||
|
|
||||||
|
// return retString;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public static bool HttpIOGet(string Url, string file, string postDataStr="")
|
||||||
|
// {
|
||||||
|
// HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url + (postDataStr == "" ? "" : "?") + postDataStr);
|
||||||
|
// request.Method = "GET";
|
||||||
|
// request.ContentType = "text/html;charset=UTF-8";
|
||||||
|
|
||||||
|
// HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||||
|
// Stream myResponseStream = response.GetResponseStream();
|
||||||
|
// FileStream writer = new FileStream(file, FileMode.OpenOrCreate, FileAccess.Write);
|
||||||
|
// byte[] buffer = new byte[1024];
|
||||||
|
// int c;
|
||||||
|
// while ((c = myResponseStream.Read(buffer, 0, buffer.Length)) > 0)
|
||||||
|
// {
|
||||||
|
// writer.Write(buffer, 0, c);
|
||||||
|
// }
|
||||||
|
// writer.Close();
|
||||||
|
// myResponseStream.Close();
|
||||||
|
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public static string HttpPost(string Url, string postDataStr="")
|
||||||
|
// {
|
||||||
|
// CookieContainer cookie = new CookieContainer();
|
||||||
|
//#pragma warning disable SYSLIB0014 // 类型或成员已过时
|
||||||
|
// HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url);
|
||||||
|
//#pragma warning restore SYSLIB0014 // 类型或成员已过时
|
||||||
|
// request.Method = "POST";
|
||||||
|
// request.ContentType = "application/x-www-form-urlencoded";
|
||||||
|
// request.ContentLength = Encoding.UTF8.GetByteCount(postDataStr);
|
||||||
|
// request.CookieContainer = cookie;
|
||||||
|
|
||||||
|
// Stream myRequestStream = request.GetRequestStream();
|
||||||
|
// StreamWriter myStreamWriter = new StreamWriter(myRequestStream, Encoding.GetEncoding("gb2312"));
|
||||||
|
// myStreamWriter.Write(postDataStr);
|
||||||
|
// myStreamWriter.Close();
|
||||||
|
|
||||||
|
// HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||||
|
|
||||||
|
// response.Cookies = cookie.GetCookies(response.ResponseUri);
|
||||||
|
// Stream myResponseStream = response.GetResponseStream();
|
||||||
|
// StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8"));
|
||||||
|
// string retString = myStreamReader.ReadToEnd();
|
||||||
|
// myStreamReader.Close();
|
||||||
|
// myResponseStream.Close();
|
||||||
|
|
||||||
|
// return retString;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,7 +10,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
{
|
{
|
||||||
public static dynamic[] ToDynamicArray(this IEnumerable<long> ids)
|
public static dynamic[] ToDynamicArray(this IEnumerable<long> ids)
|
||||||
{
|
{
|
||||||
return ids.Select(id => (dynamic)id).ToArray();
|
return ids.Select(id => (dynamic)id).ToArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.NetworkInformation;
|
using System.Net.NetworkInformation;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
|
||||||
namespace Yi.Framework.Core.Helper
|
namespace Yi.Framework.Core.Helper
|
||||||
{
|
{
|
||||||
public class IpHelper
|
public class IpHelper
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Converters;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace Yi.Framework.Core.Helper
|
namespace Yi.Framework.Core.Helper
|
||||||
{
|
{
|
||||||
@@ -14,17 +11,17 @@ namespace Yi.Framework.Core.Helper
|
|||||||
{
|
{
|
||||||
DateTimeFormat = dateTimeFormat
|
DateTimeFormat = dateTimeFormat
|
||||||
};
|
};
|
||||||
return Newtonsoft.Json.JsonConvert.SerializeObject(obj, Formatting.Indented, timeConverter);
|
return JsonConvert.SerializeObject(obj, Formatting.Indented, timeConverter);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string ObjToStr<T>(T obj)
|
public static string ObjToStr<T>(T obj)
|
||||||
{
|
{
|
||||||
return Newtonsoft.Json.JsonConvert.SerializeObject(obj);
|
return JsonConvert.SerializeObject(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static T StrToObj<T>(string str)
|
public static T StrToObj<T>(string str)
|
||||||
{
|
{
|
||||||
return Newtonsoft.Json.JsonConvert.DeserializeObject<T>(str)!;
|
return JsonConvert.DeserializeObject<T>(str)!;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 转换对象为JSON格式数据
|
/// 转换对象为JSON格式数据
|
||||||
@@ -34,13 +31,12 @@ namespace Yi.Framework.Core.Helper
|
|||||||
/// <returns>字符格式的JSON数据</returns>
|
/// <returns>字符格式的JSON数据</returns>
|
||||||
public static string GetJSON<T>(object obj)
|
public static string GetJSON<T>(object obj)
|
||||||
{
|
{
|
||||||
string result = String.Empty;
|
string result = string.Empty;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
System.Text.Json.JsonSerializer.Serialize("");
|
|
||||||
System.Runtime.Serialization.Json.DataContractJsonSerializer serializer =
|
System.Runtime.Serialization.Json.DataContractJsonSerializer serializer =
|
||||||
new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(T));
|
new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(T));
|
||||||
using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
serializer.WriteObject(ms, obj);
|
serializer.WriteObject(ms, obj);
|
||||||
result = System.Text.Encoding.UTF8.GetString(ms.ToArray());
|
result = System.Text.Encoding.UTF8.GetString(ms.ToArray());
|
||||||
@@ -67,7 +63,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
|
|
||||||
foreach (T city in vals)
|
foreach (T city in vals)
|
||||||
{
|
{
|
||||||
using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
s.WriteObject(ms, city);
|
s.WriteObject(ms, city);
|
||||||
st.Append(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
|
st.Append(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
|
||||||
@@ -89,8 +85,8 @@ namespace Yi.Framework.Core.Helper
|
|||||||
public static T ParseFormByJson<T>(string jsonStr)
|
public static T ParseFormByJson<T>(string jsonStr)
|
||||||
{
|
{
|
||||||
T obj = Activator.CreateInstance<T>();
|
T obj = Activator.CreateInstance<T>();
|
||||||
using (System.IO.MemoryStream ms =
|
using (MemoryStream ms =
|
||||||
new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(jsonStr)))
|
new MemoryStream(System.Text.Encoding.UTF8.GetBytes(jsonStr)))
|
||||||
{
|
{
|
||||||
System.Runtime.Serialization.Json.DataContractJsonSerializer serializer =
|
System.Runtime.Serialization.Json.DataContractJsonSerializer serializer =
|
||||||
new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(T));
|
new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(T));
|
||||||
@@ -107,7 +103,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
|
|
||||||
foreach (SendData city in vals)
|
foreach (SendData city in vals)
|
||||||
{
|
{
|
||||||
using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
s.WriteObject(ms, city);
|
s.WriteObject(ms, city);
|
||||||
st.Append(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
|
st.Append(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
|
||||||
@@ -130,7 +126,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
{
|
{
|
||||||
char s = json[0];
|
char s = json[0];
|
||||||
char e = json[json.Length - 1];
|
char e = json[json.Length - 1];
|
||||||
return (s == '{' && e == '}') || (s == '[' && e == ']');
|
return s == '{' && e == '}' || s == '[' && e == ']';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -294,10 +290,10 @@ namespace Yi.Framework.Core.Helper
|
|||||||
{
|
{
|
||||||
if (cs.keyStart <= 0)
|
if (cs.keyStart <= 0)
|
||||||
{
|
{
|
||||||
cs.keyStart = (c == '"' ? 3 : 2);
|
cs.keyStart = c == '"' ? 3 : 2;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if ((cs.keyStart == 2 && c == '\'') || (cs.keyStart == 3 && c == '"'))
|
else if (cs.keyStart == 2 && c == '\'' || cs.keyStart == 3 && c == '"')
|
||||||
{
|
{
|
||||||
if (!cs.escapeChar)
|
if (!cs.escapeChar)
|
||||||
{
|
{
|
||||||
@@ -314,10 +310,10 @@ namespace Yi.Framework.Core.Helper
|
|||||||
{
|
{
|
||||||
if (cs.valueStart <= 0)
|
if (cs.valueStart <= 0)
|
||||||
{
|
{
|
||||||
cs.valueStart = (c == '"' ? 3 : 2);
|
cs.valueStart = c == '"' ? 3 : 2;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if ((cs.valueStart == 2 && c == '\'') || (cs.valueStart == 3 && c == '"'))
|
else if (cs.valueStart == 2 && c == '\'' || cs.valueStart == 3 && c == '"')
|
||||||
{
|
{
|
||||||
if (!cs.escapeChar)
|
if (!cs.escapeChar)
|
||||||
{
|
{
|
||||||
@@ -454,14 +450,14 @@ namespace Yi.Framework.Core.Helper
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//示例 ["aa",{"bbbb":123,"fff","ddd"}]
|
//示例 ["aa",{"bbbb":123,"fff","Ddd"}]
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case '{'://[{ "[{A}]":[{"[{B}]":3,"m":"C"}]}]
|
case '{'://[{ "[{A}]":[{"[{B}]":3,"m":"C"}]}]
|
||||||
isError = jsonStart && state == 0;//重复开始错误 同时不是值处理。
|
isError = jsonStart && state == 0;//重复开始错误 同时不是值处理。
|
||||||
break;
|
break;
|
||||||
case '}':
|
case '}':
|
||||||
isError = !jsonStart || (keyStart != 0 && state == 0);//重复结束错误 或者 提前结束{"aa"}。正常的有{}
|
isError = !jsonStart || keyStart != 0 && state == 0;//重复结束错误 或者 提前结束{"aa"}。正常的有{}
|
||||||
break;
|
break;
|
||||||
case '[':
|
case '[':
|
||||||
isError = arrayStart && state == 0;//重复开始错误
|
isError = arrayStart && state == 0;//重复开始错误
|
||||||
@@ -475,7 +471,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
if (!isError)
|
if (!isError)
|
||||||
{
|
{
|
||||||
//重复开始 [""",{"" "}]
|
//重复开始 [""",{"" "}]
|
||||||
isError = (state == 0 && keyStart == -1) || (state == 1 && valueStart == -1);
|
isError = state == 0 && keyStart == -1 || state == 1 && valueStart == -1;
|
||||||
}
|
}
|
||||||
if (!isError && arrayStart && !jsonStart && c == '\'')//['aa',{}]
|
if (!isError && arrayStart && !jsonStart && c == '\'')//['aa',{}]
|
||||||
{
|
{
|
||||||
@@ -491,7 +487,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
{
|
{
|
||||||
if (jsonStart)
|
if (jsonStart)
|
||||||
{
|
{
|
||||||
isError = state == 0 || (state == 1 && valueStart > 1);//重复出现。
|
isError = state == 0 || state == 1 && valueStart > 1;//重复出现。
|
||||||
}
|
}
|
||||||
else if (arrayStart)//["aa,] [,] [{},{}]
|
else if (arrayStart)//["aa,] [,] [{},{}]
|
||||||
{
|
{
|
||||||
@@ -506,7 +502,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
case '\t':
|
case '\t':
|
||||||
break;
|
break;
|
||||||
default: //值开头。。
|
default: //值开头。。
|
||||||
isError = (!jsonStart && !arrayStart) || (state == 0 && keyStart == -1) || (valueStart == -1 && state == 1);//
|
isError = !jsonStart && !arrayStart || state == 0 && keyStart == -1 || valueStart == -1 && state == 1;//
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//if (isError)
|
//if (isError)
|
||||||
@@ -5,7 +5,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace Yi.Framework.Core.Helper
|
namespace Yi.Framework.Core.Helper
|
||||||
{
|
{
|
||||||
public class MD5Helper
|
public class MD5Helper
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生成PasswordSalt
|
/// 生成PasswordSalt
|
||||||
@@ -15,7 +15,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
{
|
{
|
||||||
byte[] buf = new byte[16];
|
byte[] buf = new byte[16];
|
||||||
#pragma warning disable SYSLIB0023 // 类型或成员已过时
|
#pragma warning disable SYSLIB0023 // 类型或成员已过时
|
||||||
(new RNGCryptoServiceProvider()).GetBytes(buf);
|
new RNGCryptoServiceProvider().GetBytes(buf);
|
||||||
#pragma warning restore SYSLIB0023 // 类型或成员已过时
|
#pragma warning restore SYSLIB0023 // 类型或成员已过时
|
||||||
return Convert.ToBase64String(buf);
|
return Convert.ToBase64String(buf);
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
Buffer.BlockCopy(bIn, 0, bAll, bSalt.Length, bIn.Length);
|
Buffer.BlockCopy(bIn, 0, bAll, bSalt.Length, bIn.Length);
|
||||||
|
|
||||||
#pragma warning disable SYSLIB0021 // 类型或成员已过时
|
#pragma warning disable SYSLIB0021 // 类型或成员已过时
|
||||||
var s = SHA512Managed.Create();
|
var s = SHA512.Create();
|
||||||
#pragma warning restore SYSLIB0021 // 类型或成员已过时
|
#pragma warning restore SYSLIB0021 // 类型或成员已过时
|
||||||
bRet = s.ComputeHash(bAll);
|
bRet = s.ComputeHash(bAll);
|
||||||
|
|
||||||
260
Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/MimeHelper.cs
Normal file
260
Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/MimeHelper.cs
Normal file
@@ -0,0 +1,260 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Yi.Framework.Core.Enums;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Core.Helper
|
||||||
|
{
|
||||||
|
public static class MimeHelper
|
||||||
|
{
|
||||||
|
// 通过自己定义一个静态类
|
||||||
|
// 将所有的Content Type都扔进去吧
|
||||||
|
// 调用的时候直接调用静态方法即可。
|
||||||
|
|
||||||
|
public static List<string> ImageType { get; set; } = new List<string>
|
||||||
|
{
|
||||||
|
".jpg",".png",".jpeg"
|
||||||
|
};
|
||||||
|
|
||||||
|
private static Hashtable _mimeMappingTable;
|
||||||
|
|
||||||
|
private static void AddMimeMapping(string extension, string MimeType)
|
||||||
|
{
|
||||||
|
_mimeMappingTable.Add(extension, MimeType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetMimeMapping(string FileName)
|
||||||
|
{
|
||||||
|
string text = null!;
|
||||||
|
int num = FileName.LastIndexOf('.');
|
||||||
|
if (0 < num && num > FileName.LastIndexOf('\\'))
|
||||||
|
{
|
||||||
|
text = (string)_mimeMappingTable[FileName.Substring(num)]!;
|
||||||
|
}
|
||||||
|
if (text == null)
|
||||||
|
{
|
||||||
|
text = (string)_mimeMappingTable[".*"]!;
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FileTypeEnum GetFileType(string fileName)
|
||||||
|
{
|
||||||
|
var extension = Path.GetExtension(fileName);
|
||||||
|
if (ImageType.Contains(extension.ToLower()))
|
||||||
|
return FileTypeEnum.Image;
|
||||||
|
return FileTypeEnum.File;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static MimeHelper()
|
||||||
|
{
|
||||||
|
_mimeMappingTable = new Hashtable(190, StringComparer.CurrentCultureIgnoreCase);
|
||||||
|
AddMimeMapping(".323", "text/h323");
|
||||||
|
AddMimeMapping(".asx", "video/x-ms-asf");
|
||||||
|
AddMimeMapping(".acx", "application/internet-property-stream");
|
||||||
|
AddMimeMapping(".ai", "application/postscript");
|
||||||
|
AddMimeMapping(".aif", "audio/x-aiff");
|
||||||
|
AddMimeMapping(".aiff", "audio/aiff");
|
||||||
|
AddMimeMapping(".axs", "application/olescript");
|
||||||
|
AddMimeMapping(".aifc", "audio/aiff");
|
||||||
|
AddMimeMapping(".asr", "video/x-ms-asf");
|
||||||
|
AddMimeMapping(".avi", "video/x-msvideo");
|
||||||
|
AddMimeMapping(".asf", "video/x-ms-asf");
|
||||||
|
AddMimeMapping(".au", "audio/basic");
|
||||||
|
AddMimeMapping(".application", "application/x-ms-application");
|
||||||
|
AddMimeMapping(".bin", "application/octet-stream");
|
||||||
|
AddMimeMapping(".bas", "text/plain");
|
||||||
|
AddMimeMapping(".bcpio", "application/x-bcpio");
|
||||||
|
AddMimeMapping(".bmp", "image/bmp");
|
||||||
|
AddMimeMapping(".cdf", "application/x-cdf");
|
||||||
|
AddMimeMapping(".cat", "application/vndms-pkiseccat");
|
||||||
|
AddMimeMapping(".crt", "application/x-x509-ca-cert");
|
||||||
|
AddMimeMapping(".c", "text/plain");
|
||||||
|
AddMimeMapping(".css", "text/css");
|
||||||
|
AddMimeMapping(".cer", "application/x-x509-ca-cert");
|
||||||
|
AddMimeMapping(".crl", "application/pkix-crl");
|
||||||
|
AddMimeMapping(".cmx", "image/x-cmx");
|
||||||
|
AddMimeMapping(".csh", "application/x-csh");
|
||||||
|
AddMimeMapping(".cod", "image/cis-cod");
|
||||||
|
AddMimeMapping(".cpio", "application/x-cpio");
|
||||||
|
AddMimeMapping(".clp", "application/x-msclip");
|
||||||
|
AddMimeMapping(".crd", "application/x-mscardfile");
|
||||||
|
AddMimeMapping(".deploy", "application/octet-stream");
|
||||||
|
AddMimeMapping(".dll", "application/x-msdownload");
|
||||||
|
AddMimeMapping(".dot", "application/msword");
|
||||||
|
AddMimeMapping(".doc", "application/msword");
|
||||||
|
AddMimeMapping(".dvi", "application/x-dvi");
|
||||||
|
AddMimeMapping(".dir", "application/x-director");
|
||||||
|
AddMimeMapping(".dxr", "application/x-director");
|
||||||
|
AddMimeMapping(".der", "application/x-x509-ca-cert");
|
||||||
|
AddMimeMapping(".dib", "image/bmp");
|
||||||
|
AddMimeMapping(".dcr", "application/x-director");
|
||||||
|
AddMimeMapping(".disco", "text/xml");
|
||||||
|
AddMimeMapping(".exe", "application/octet-stream");
|
||||||
|
AddMimeMapping(".etx", "text/x-setext");
|
||||||
|
AddMimeMapping(".evy", "application/envoy");
|
||||||
|
AddMimeMapping(".eml", "message/rfc822");
|
||||||
|
AddMimeMapping(".eps", "application/postscript");
|
||||||
|
AddMimeMapping(".flr", "x-world/x-vrml");
|
||||||
|
AddMimeMapping(".fif", "application/fractals");
|
||||||
|
AddMimeMapping(".gtar", "application/x-gtar");
|
||||||
|
AddMimeMapping(".gif", "image/gif");
|
||||||
|
AddMimeMapping(".gz", "application/x-gzip");
|
||||||
|
AddMimeMapping(".hta", "application/hta");
|
||||||
|
AddMimeMapping(".htc", "text/x-component");
|
||||||
|
AddMimeMapping(".htt", "text/webviewhtml");
|
||||||
|
AddMimeMapping(".h", "text/plain");
|
||||||
|
AddMimeMapping(".hdf", "application/x-hdf");
|
||||||
|
AddMimeMapping(".hlp", "application/winhlp");
|
||||||
|
AddMimeMapping(".html", "text/html");
|
||||||
|
AddMimeMapping(".htm", "text/html");
|
||||||
|
AddMimeMapping(".hqx", "application/mac-binhex40");
|
||||||
|
AddMimeMapping(".isp", "application/x-internet-signup");
|
||||||
|
AddMimeMapping(".iii", "application/x-iphone");
|
||||||
|
AddMimeMapping(".ief", "image/ief");
|
||||||
|
AddMimeMapping(".ivf", "video/x-ivf");
|
||||||
|
AddMimeMapping(".ins", "application/x-internet-signup");
|
||||||
|
AddMimeMapping(".ico", "image/x-icon");
|
||||||
|
AddMimeMapping(".jpg", "image/jpeg");
|
||||||
|
AddMimeMapping(".jfif", "image/pjpeg");
|
||||||
|
AddMimeMapping(".jpe", "image/jpeg");
|
||||||
|
AddMimeMapping(".jpeg", "image/jpeg");
|
||||||
|
AddMimeMapping(".js", "application/x-javascript");
|
||||||
|
AddMimeMapping(".lsx", "video/x-la-asf");
|
||||||
|
AddMimeMapping(".latex", "application/x-latex");
|
||||||
|
AddMimeMapping(".lsf", "video/x-la-asf");
|
||||||
|
AddMimeMapping(".manifest", "application/x-ms-manifest");
|
||||||
|
AddMimeMapping(".mhtml", "message/rfc822");
|
||||||
|
AddMimeMapping(".mny", "application/x-msmoney");
|
||||||
|
AddMimeMapping(".mht", "message/rfc822");
|
||||||
|
AddMimeMapping(".mid", "audio/mid");
|
||||||
|
AddMimeMapping(".mpv2", "video/mpeg");
|
||||||
|
AddMimeMapping(".man", "application/x-troff-man");
|
||||||
|
AddMimeMapping(".mvb", "application/x-msmediaview");
|
||||||
|
AddMimeMapping(".mpeg", "video/mpeg");
|
||||||
|
AddMimeMapping(".m3u", "audio/x-mpegurl");
|
||||||
|
AddMimeMapping(".mdb", "application/x-msaccess");
|
||||||
|
AddMimeMapping(".mpp", "application/vnd.ms-project");
|
||||||
|
AddMimeMapping(".m1v", "video/mpeg");
|
||||||
|
AddMimeMapping(".mpa", "video/mpeg");
|
||||||
|
AddMimeMapping(".me", "application/x-troff-me");
|
||||||
|
AddMimeMapping(".m13", "application/x-msmediaview");
|
||||||
|
AddMimeMapping(".movie", "video/x-sgi-movie");
|
||||||
|
AddMimeMapping(".m14", "application/x-msmediaview");
|
||||||
|
AddMimeMapping(".mpe", "video/mpeg");
|
||||||
|
AddMimeMapping(".mp2", "video/mpeg");
|
||||||
|
AddMimeMapping(".mov", "video/quicktime");
|
||||||
|
AddMimeMapping(".mp3", "audio/mpeg");
|
||||||
|
AddMimeMapping(".mpg", "video/mpeg");
|
||||||
|
AddMimeMapping(".ms", "application/x-troff-ms");
|
||||||
|
AddMimeMapping(".nc", "application/x-netcdf");
|
||||||
|
AddMimeMapping(".nws", "message/rfc822");
|
||||||
|
AddMimeMapping(".oda", "application/oda");
|
||||||
|
AddMimeMapping(".ods", "application/oleobject");
|
||||||
|
AddMimeMapping(".pmc", "application/x-perfmon");
|
||||||
|
AddMimeMapping(".p7r", "application/x-pkcs7-certreqresp");
|
||||||
|
AddMimeMapping(".p7b", "application/x-pkcs7-certificates");
|
||||||
|
AddMimeMapping(".p7s", "application/pkcs7-signature");
|
||||||
|
AddMimeMapping(".pmw", "application/x-perfmon");
|
||||||
|
AddMimeMapping(".ps", "application/postscript");
|
||||||
|
AddMimeMapping(".p7c", "application/pkcs7-mime");
|
||||||
|
AddMimeMapping(".pbm", "image/x-portable-bitmap");
|
||||||
|
AddMimeMapping(".ppm", "image/x-portable-pixmap");
|
||||||
|
AddMimeMapping(".pub", "application/x-mspublisher");
|
||||||
|
AddMimeMapping(".pnm", "image/x-portable-anymap");
|
||||||
|
AddMimeMapping(".png", "image/png");
|
||||||
|
AddMimeMapping(".pml", "application/x-perfmon");
|
||||||
|
AddMimeMapping(".p10", "application/pkcs10");
|
||||||
|
AddMimeMapping(".pfx", "application/x-pkcs12");
|
||||||
|
AddMimeMapping(".p12", "application/x-pkcs12");
|
||||||
|
AddMimeMapping(".pdf", "application/pdf");
|
||||||
|
AddMimeMapping(".pps", "application/vnd.ms-powerpoint");
|
||||||
|
AddMimeMapping(".p7m", "application/pkcs7-mime");
|
||||||
|
AddMimeMapping(".pko", "application/vndms-pkipko");
|
||||||
|
AddMimeMapping(".ppt", "application/vnd.ms-powerpoint");
|
||||||
|
AddMimeMapping(".pmr", "application/x-perfmon");
|
||||||
|
AddMimeMapping(".pma", "application/x-perfmon");
|
||||||
|
AddMimeMapping(".pot", "application/vnd.ms-powerpoint");
|
||||||
|
AddMimeMapping(".prf", "application/pics-rules");
|
||||||
|
AddMimeMapping(".pgm", "image/x-portable-graymap");
|
||||||
|
AddMimeMapping(".qt", "video/quicktime");
|
||||||
|
AddMimeMapping(".ra", "audio/x-pn-realaudio");
|
||||||
|
AddMimeMapping(".rgb", "image/x-rgb");
|
||||||
|
AddMimeMapping(".ram", "audio/x-pn-realaudio");
|
||||||
|
AddMimeMapping(".rmi", "audio/mid");
|
||||||
|
AddMimeMapping(".ras", "image/x-cmu-raster");
|
||||||
|
AddMimeMapping(".roff", "application/x-troff");
|
||||||
|
AddMimeMapping(".rtf", "application/rtf");
|
||||||
|
AddMimeMapping(".rtx", "text/richtext");
|
||||||
|
AddMimeMapping(".sv4crc", "application/x-sv4crc");
|
||||||
|
AddMimeMapping(".spc", "application/x-pkcs7-certificates");
|
||||||
|
AddMimeMapping(".setreg", "application/set-registration-initiation");
|
||||||
|
AddMimeMapping(".snd", "audio/basic");
|
||||||
|
AddMimeMapping(".stl", "application/vndms-pkistl");
|
||||||
|
AddMimeMapping(".setpay", "application/set-payment-initiation");
|
||||||
|
AddMimeMapping(".stm", "text/html");
|
||||||
|
AddMimeMapping(".shar", "application/x-shar");
|
||||||
|
AddMimeMapping(".sh", "application/x-sh");
|
||||||
|
AddMimeMapping(".sit", "application/x-stuffit");
|
||||||
|
AddMimeMapping(".spl", "application/futuresplash");
|
||||||
|
AddMimeMapping(".sct", "text/scriptlet");
|
||||||
|
AddMimeMapping(".scd", "application/x-msschedule");
|
||||||
|
AddMimeMapping(".sst", "application/vndms-pkicertstore");
|
||||||
|
AddMimeMapping(".src", "application/x-wais-source");
|
||||||
|
AddMimeMapping(".sv4cpio", "application/x-sv4cpio");
|
||||||
|
AddMimeMapping(".tex", "application/x-tex");
|
||||||
|
AddMimeMapping(".tgz", "application/x-compressed");
|
||||||
|
AddMimeMapping(".t", "application/x-troff");
|
||||||
|
AddMimeMapping(".tar", "application/x-tar");
|
||||||
|
AddMimeMapping(".tr", "application/x-troff");
|
||||||
|
AddMimeMapping(".tif", "image/tiff");
|
||||||
|
AddMimeMapping(".txt", "text/plain");
|
||||||
|
AddMimeMapping(".texinfo", "application/x-texinfo");
|
||||||
|
AddMimeMapping(".trm", "application/x-msterminal");
|
||||||
|
AddMimeMapping(".tiff", "image/tiff");
|
||||||
|
AddMimeMapping(".tcl", "application/x-tcl");
|
||||||
|
AddMimeMapping(".texi", "application/x-texinfo");
|
||||||
|
AddMimeMapping(".tsv", "text/tab-separated-values");
|
||||||
|
AddMimeMapping(".ustar", "application/x-ustar");
|
||||||
|
AddMimeMapping(".uls", "text/iuls");
|
||||||
|
AddMimeMapping(".vcf", "text/x-vcard");
|
||||||
|
AddMimeMapping(".wps", "application/vnd.ms-works");
|
||||||
|
AddMimeMapping(".wav", "audio/wav");
|
||||||
|
AddMimeMapping(".wrz", "x-world/x-vrml");
|
||||||
|
AddMimeMapping(".wri", "application/x-mswrite");
|
||||||
|
AddMimeMapping(".wks", "application/vnd.ms-works");
|
||||||
|
AddMimeMapping(".wmf", "application/x-msmetafile");
|
||||||
|
AddMimeMapping(".wcm", "application/vnd.ms-works");
|
||||||
|
AddMimeMapping(".wrl", "x-world/x-vrml");
|
||||||
|
AddMimeMapping(".wdb", "application/vnd.ms-works");
|
||||||
|
AddMimeMapping(".wsdl", "text/xml");
|
||||||
|
AddMimeMapping(".xap", "application/x-silverlight-app");
|
||||||
|
AddMimeMapping(".xml", "text/xml");
|
||||||
|
AddMimeMapping(".xlm", "application/vnd.ms-excel");
|
||||||
|
AddMimeMapping(".xaf", "x-world/x-vrml");
|
||||||
|
AddMimeMapping(".xla", "application/vnd.ms-excel");
|
||||||
|
AddMimeMapping(".xls", "application/vnd.ms-excel");
|
||||||
|
AddMimeMapping(".xlsx", "application/vnd.ms-excel");
|
||||||
|
AddMimeMapping(".xof", "x-world/x-vrml");
|
||||||
|
AddMimeMapping(".xlt", "application/vnd.ms-excel");
|
||||||
|
AddMimeMapping(".xlc", "application/vnd.ms-excel");
|
||||||
|
AddMimeMapping(".xsl", "text/xml");
|
||||||
|
AddMimeMapping(".xbm", "image/x-xbitmap");
|
||||||
|
AddMimeMapping(".xlw", "application/vnd.ms-excel");
|
||||||
|
AddMimeMapping(".xpm", "image/x-xpixmap");
|
||||||
|
AddMimeMapping(".xwd", "image/x-xwindowdump");
|
||||||
|
AddMimeMapping(".xsd", "text/xml");
|
||||||
|
AddMimeMapping(".z", "application/x-compress");
|
||||||
|
AddMimeMapping(".zip", "application/x-zip-compressed");
|
||||||
|
AddMimeMapping(".*", "application/octet-stream");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -23,9 +23,9 @@ namespace Yi.Framework.Core.Helper
|
|||||||
{
|
{
|
||||||
string rootPath = Directory.GetCurrentDirectory();
|
string rootPath = Directory.GetCurrentDirectory();
|
||||||
string filePath = Path.Combine(rootPath, fileName);
|
string filePath = Path.Combine(rootPath, fileName);
|
||||||
if (!System.IO.File.Exists(filePath))
|
if (!File.Exists(filePath))
|
||||||
throw new Exception("文件不存在");
|
throw new Exception("文件不存在");
|
||||||
string key = System.IO.File.ReadAllText(filePath);
|
string key = File.ReadAllText(filePath);
|
||||||
var rsa = RSA.Create();
|
var rsa = RSA.Create();
|
||||||
rsa.ImportFromPem(key.AsSpan());
|
rsa.ImportFromPem(key.AsSpan());
|
||||||
return rsa;
|
return rsa;
|
||||||
390
Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/RSAHelper.cs
Normal file
390
Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/RSAHelper.cs
Normal file
@@ -0,0 +1,390 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Core.Helper
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// RSA加解密 使用OpenSSL的公钥加密/私钥解密
|
||||||
|
/// 公私钥请使用openssl生成
|
||||||
|
/// </summary>
|
||||||
|
public class RSAHelper
|
||||||
|
{
|
||||||
|
public readonly RSA? _privateKeyRsaProvider;
|
||||||
|
public readonly RSA? _publicKeyRsaProvider;
|
||||||
|
private readonly HashAlgorithmName _hashAlgorithmName;
|
||||||
|
private readonly Encoding _encoding;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 实例化RSAHelper
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rsaType">加密算法类型 RSA SHA1;RSA2 SHA256 密钥长度至少为2048</param>
|
||||||
|
/// <param name="encoding">编码类型</param>
|
||||||
|
/// <param name="privateKey">私钥</param>
|
||||||
|
/// <param name="publicKey">公钥</param>
|
||||||
|
public RSAHelper(RSAType rsaType, Encoding encoding, string privateKey, string? publicKey = null)
|
||||||
|
{
|
||||||
|
_encoding = encoding;
|
||||||
|
if (!string.IsNullOrEmpty(privateKey))
|
||||||
|
{
|
||||||
|
_privateKeyRsaProvider = CreateRsaProviderFromPrivateKey(privateKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(publicKey))
|
||||||
|
{
|
||||||
|
_publicKeyRsaProvider = CreateRsaProviderFromPublicKey(publicKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
_hashAlgorithmName = rsaType == RSAType.RSA ? HashAlgorithmName.SHA1 : HashAlgorithmName.SHA256;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 使用私钥签名
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 使用私钥签名
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="data">原始数据</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public string Sign(string data)
|
||||||
|
{
|
||||||
|
byte[] dataBytes = _encoding.GetBytes(data);
|
||||||
|
|
||||||
|
var signatureBytes = _privateKeyRsaProvider!.SignData(dataBytes, _hashAlgorithmName, RSASignaturePadding.Pkcs1);
|
||||||
|
|
||||||
|
return Convert.ToBase64String(signatureBytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 使用公钥验签
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 使用公钥验签
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="data">原始数据</param>
|
||||||
|
/// <param name="sign">签名</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool Verify(string data, string sign)
|
||||||
|
{
|
||||||
|
byte[] dataBytes = _encoding.GetBytes(data);
|
||||||
|
byte[] signBytes = Convert.FromBase64String(sign);
|
||||||
|
|
||||||
|
var verify = _publicKeyRsaProvider!.VerifyData(dataBytes, signBytes, _hashAlgorithmName, RSASignaturePadding.Pkcs1);
|
||||||
|
|
||||||
|
return verify;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 解密
|
||||||
|
/// <summary>
|
||||||
|
/// 私钥解密(原)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cipherText">解密字符串(base64)</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
//public string Decrypt(string cipherText)
|
||||||
|
//{
|
||||||
|
// if (_privateKeyRsaProvider == null)
|
||||||
|
// {
|
||||||
|
// throw new Exception("_privateKeyRsaProvider is null");
|
||||||
|
// }
|
||||||
|
// return _encoding.GetString(_privateKeyRsaProvider.Decrypt(Convert.FromBase64String(cipherText), RSAEncryptionPadding.Pkcs1));
|
||||||
|
//}
|
||||||
|
/// <summary>
|
||||||
|
/// 私钥解密(支持大量数据)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cipherText"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public string Decrypt(string cipherText)
|
||||||
|
{
|
||||||
|
if (_privateKeyRsaProvider == null)
|
||||||
|
{
|
||||||
|
throw new Exception("_privateKeyRsaProvider is null");
|
||||||
|
}
|
||||||
|
var bufferSize = _privateKeyRsaProvider.KeySize / 8;
|
||||||
|
byte[] buffer = new byte[bufferSize];//待解密块
|
||||||
|
using (MemoryStream msInput = new MemoryStream(Convert.FromBase64String(cipherText)))
|
||||||
|
{
|
||||||
|
using (MemoryStream msOutput = new MemoryStream())
|
||||||
|
{
|
||||||
|
int readLen; while ((readLen = msInput.Read(buffer, 0, bufferSize)) > 0)
|
||||||
|
{
|
||||||
|
byte[] dataToEnc = new byte[readLen];
|
||||||
|
Array.Copy(buffer, 0, dataToEnc, 0, readLen); byte[] encData = _privateKeyRsaProvider.Decrypt(dataToEnc, RSAEncryptionPadding.Pkcs1);
|
||||||
|
msOutput.Write(encData, 0, encData.Length);
|
||||||
|
}
|
||||||
|
byte[] result = msOutput.ToArray();
|
||||||
|
return _encoding.GetString(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 加密
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 公钥加密(原)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="text"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
//public string Encrypt(string text)
|
||||||
|
//{
|
||||||
|
// if (_publicKeyRsaProvider == null)
|
||||||
|
// {
|
||||||
|
// throw new Exception("_publicKeyRsaProvider is null");
|
||||||
|
// }
|
||||||
|
// return Convert.ToBase64String(_publicKeyRsaProvider.Encrypt(Encoding.UTF8.GetBytes(text), RSAEncryptionPadding.Pkcs1));
|
||||||
|
//}
|
||||||
|
/// <summary>
|
||||||
|
/// 公钥加密(支持大量数据)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="text"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public string Encrypt(string text)
|
||||||
|
{
|
||||||
|
if (_publicKeyRsaProvider == null)
|
||||||
|
{
|
||||||
|
throw new Exception("_publicKeyRsaProvider is null");
|
||||||
|
}
|
||||||
|
var bufferSize = _publicKeyRsaProvider.KeySize / 8 - 11;
|
||||||
|
byte[] buffer = new byte[bufferSize];//待加密块
|
||||||
|
|
||||||
|
using (MemoryStream msInput = new MemoryStream(_encoding.GetBytes(text)))
|
||||||
|
{
|
||||||
|
using (MemoryStream msOutput = new MemoryStream())
|
||||||
|
{
|
||||||
|
int readLen; while ((readLen = msInput.Read(buffer, 0, bufferSize)) > 0)
|
||||||
|
{
|
||||||
|
byte[] dataToEnc = new byte[readLen];
|
||||||
|
Array.Copy(buffer, 0, dataToEnc, 0, readLen); byte[] encData = _publicKeyRsaProvider.Encrypt(dataToEnc, RSAEncryptionPadding.Pkcs1);
|
||||||
|
msOutput.Write(encData, 0, encData.Length);
|
||||||
|
}
|
||||||
|
byte[] result = msOutput.ToArray();
|
||||||
|
return Convert.ToBase64String(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 使用私钥创建RSA实例
|
||||||
|
/// <summary>
|
||||||
|
/// 使用私钥创建RSA实例
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="privateKey"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private RSA CreateRsaProviderFromPrivateKey(string privateKey)
|
||||||
|
{
|
||||||
|
var privateKeyBits = Convert.FromBase64String(privateKey);
|
||||||
|
|
||||||
|
var rsa = RSA.Create();
|
||||||
|
var rsaParameters = new RSAParameters();
|
||||||
|
|
||||||
|
using (BinaryReader binr = new BinaryReader(new MemoryStream(privateKeyBits)))
|
||||||
|
{
|
||||||
|
byte bt = 0;
|
||||||
|
ushort twobytes = 0;
|
||||||
|
twobytes = binr.ReadUInt16();
|
||||||
|
if (twobytes == 0x8130)
|
||||||
|
binr.ReadByte();
|
||||||
|
else if (twobytes == 0x8230)
|
||||||
|
binr.ReadInt16();
|
||||||
|
else
|
||||||
|
throw new Exception("Unexpected value read binr.ReadUInt16()");
|
||||||
|
|
||||||
|
twobytes = binr.ReadUInt16();
|
||||||
|
if (twobytes != 0x0102)
|
||||||
|
throw new Exception("Unexpected version");
|
||||||
|
|
||||||
|
bt = binr.ReadByte();
|
||||||
|
if (bt != 0x00)
|
||||||
|
throw new Exception("Unexpected value read binr.ReadByte()");
|
||||||
|
|
||||||
|
rsaParameters.Modulus = binr.ReadBytes(GetIntegerSize(binr));
|
||||||
|
rsaParameters.Exponent = binr.ReadBytes(GetIntegerSize(binr));
|
||||||
|
rsaParameters.D = binr.ReadBytes(GetIntegerSize(binr));
|
||||||
|
rsaParameters.P = binr.ReadBytes(GetIntegerSize(binr));
|
||||||
|
rsaParameters.Q = binr.ReadBytes(GetIntegerSize(binr));
|
||||||
|
rsaParameters.DP = binr.ReadBytes(GetIntegerSize(binr));
|
||||||
|
rsaParameters.DQ = binr.ReadBytes(GetIntegerSize(binr));
|
||||||
|
rsaParameters.InverseQ = binr.ReadBytes(GetIntegerSize(binr));
|
||||||
|
}
|
||||||
|
|
||||||
|
rsa.ImportParameters(rsaParameters);
|
||||||
|
return rsa;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 使用公钥创建RSA实例
|
||||||
|
/// <summary>
|
||||||
|
/// 使用公钥创建RSA实例
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="publicKeyString"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public RSA? CreateRsaProviderFromPublicKey(string publicKeyString)
|
||||||
|
{
|
||||||
|
// encoded OID sequence for PKCS #1 rsaEncryption szOID_RSA_RSA = "1.2.840.113549.1.1.1"
|
||||||
|
byte[] seqOid = { 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00 };
|
||||||
|
byte[] seq = new byte[15];
|
||||||
|
|
||||||
|
var x509Key = Convert.FromBase64String(publicKeyString);
|
||||||
|
|
||||||
|
// --------- Set up stream to read the asn.1 encoded SubjectPublicKeyInfo blob ------
|
||||||
|
using (MemoryStream mem = new MemoryStream(x509Key))
|
||||||
|
{
|
||||||
|
using (BinaryReader binr = new BinaryReader(mem)) //wrap Memory Stream with BinaryReader for easy reading
|
||||||
|
{
|
||||||
|
byte bt = 0;
|
||||||
|
ushort twobytes = 0;
|
||||||
|
|
||||||
|
twobytes = binr.ReadUInt16();
|
||||||
|
if (twobytes == 0x8130) //data read as little endian order (actual data order for Sequence is 30 81)
|
||||||
|
binr.ReadByte(); //advance 1 byte
|
||||||
|
else if (twobytes == 0x8230)
|
||||||
|
binr.ReadInt16(); //advance 2 bytes
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
|
||||||
|
seq = binr.ReadBytes(15); //read the Sequence OID
|
||||||
|
if (!CompareBytearrays(seq, seqOid)) //make sure Sequence for OID is correct
|
||||||
|
return null;
|
||||||
|
|
||||||
|
twobytes = binr.ReadUInt16();
|
||||||
|
if (twobytes == 0x8103) //data read as little endian order (actual data order for Bit String is 03 81)
|
||||||
|
binr.ReadByte(); //advance 1 byte
|
||||||
|
else if (twobytes == 0x8203)
|
||||||
|
binr.ReadInt16(); //advance 2 bytes
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
|
||||||
|
bt = binr.ReadByte();
|
||||||
|
if (bt != 0x00) //expect null byte next
|
||||||
|
return null;
|
||||||
|
|
||||||
|
twobytes = binr.ReadUInt16();
|
||||||
|
if (twobytes == 0x8130) //data read as little endian order (actual data order for Sequence is 30 81)
|
||||||
|
binr.ReadByte(); //advance 1 byte
|
||||||
|
else if (twobytes == 0x8230)
|
||||||
|
binr.ReadInt16(); //advance 2 bytes
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
|
||||||
|
twobytes = binr.ReadUInt16();
|
||||||
|
byte lowbyte = 0x00;
|
||||||
|
byte highbyte = 0x00;
|
||||||
|
|
||||||
|
if (twobytes == 0x8102) //data read as little endian order (actual data order for Integer is 02 81)
|
||||||
|
lowbyte = binr.ReadByte(); // read next bytes which is bytes in modulus
|
||||||
|
else if (twobytes == 0x8202)
|
||||||
|
{
|
||||||
|
highbyte = binr.ReadByte(); //advance 2 bytes
|
||||||
|
lowbyte = binr.ReadByte();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
byte[] modint = { lowbyte, highbyte, 0x00, 0x00 }; //reverse byte order since asn.1 key uses big endian order
|
||||||
|
int modsize = BitConverter.ToInt32(modint, 0);
|
||||||
|
|
||||||
|
int firstbyte = binr.PeekChar();
|
||||||
|
if (firstbyte == 0x00)
|
||||||
|
{ //if first byte (highest order) of modulus is zero, don't include it
|
||||||
|
binr.ReadByte(); //skip this null byte
|
||||||
|
modsize -= 1; //reduce modulus buffer size by 1
|
||||||
|
}
|
||||||
|
|
||||||
|
byte[] modulus = binr.ReadBytes(modsize); //read the modulus bytes
|
||||||
|
|
||||||
|
if (binr.ReadByte() != 0x02) //expect an Integer for the exponent data
|
||||||
|
return null;
|
||||||
|
int expbytes = binr.ReadByte(); // should only need one byte for actual exponent data (for all useful values)
|
||||||
|
byte[] exponent = binr.ReadBytes(expbytes);
|
||||||
|
|
||||||
|
// ------- create RSACryptoServiceProvider instance and initialize with public key -----
|
||||||
|
var rsa = RSA.Create();
|
||||||
|
RSAParameters rsaKeyInfo = new RSAParameters
|
||||||
|
{
|
||||||
|
Modulus = modulus,
|
||||||
|
Exponent = exponent
|
||||||
|
};
|
||||||
|
rsa.ImportParameters(rsaKeyInfo);
|
||||||
|
|
||||||
|
return rsa;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 导入密钥算法
|
||||||
|
|
||||||
|
private int GetIntegerSize(BinaryReader binr)
|
||||||
|
{
|
||||||
|
byte bt = 0;
|
||||||
|
int count = 0;
|
||||||
|
bt = binr.ReadByte();
|
||||||
|
if (bt != 0x02)
|
||||||
|
return 0;
|
||||||
|
bt = binr.ReadByte();
|
||||||
|
|
||||||
|
if (bt == 0x81)
|
||||||
|
count = binr.ReadByte();
|
||||||
|
else
|
||||||
|
if (bt == 0x82)
|
||||||
|
{
|
||||||
|
var highbyte = binr.ReadByte();
|
||||||
|
var lowbyte = binr.ReadByte();
|
||||||
|
byte[] modint = { lowbyte, highbyte, 0x00, 0x00 };
|
||||||
|
count = BitConverter.ToInt32(modint, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
count = bt;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (binr.ReadByte() == 0x00)
|
||||||
|
{
|
||||||
|
count -= 1;
|
||||||
|
}
|
||||||
|
binr.BaseStream.Seek(-1, SeekOrigin.Current);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool CompareBytearrays(byte[] a, byte[] b)
|
||||||
|
{
|
||||||
|
if (a.Length != b.Length)
|
||||||
|
return false;
|
||||||
|
int i = 0;
|
||||||
|
foreach (byte c in a)
|
||||||
|
{
|
||||||
|
if (c != b[i])
|
||||||
|
return false;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// RSA算法类型
|
||||||
|
/// </summary>
|
||||||
|
public enum RSAType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// SHA1
|
||||||
|
/// </summary>
|
||||||
|
RSA = 0,
|
||||||
|
/// <summary>
|
||||||
|
/// RSA2 密钥长度至少为2048
|
||||||
|
/// SHA256
|
||||||
|
/// </summary>
|
||||||
|
RSA2
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -61,11 +61,11 @@ namespace Yi.Framework.Core.Helper
|
|||||||
string str = string.Empty;
|
string str = string.Empty;
|
||||||
long num2 = DateTime.Now.Ticks + rep;
|
long num2 = DateTime.Now.Ticks + rep;
|
||||||
rep++;
|
rep++;
|
||||||
Random random = new Random(((int)(((ulong)num2) & 0xffffffffL)) | ((int)(num2 >> rep)));
|
Random random = new Random((int)((ulong)num2 & 0xffffffffL) | (int)(num2 >> rep));
|
||||||
for (int i = 0; i < codeCount; i++)
|
for (int i = 0; i < codeCount; i++)
|
||||||
{
|
{
|
||||||
int num = random.Next();
|
int num = random.Next();
|
||||||
str = str + ((char)(0x30 + ((ushort)(num % 10)))).ToString();
|
str = str + ((char)(0x30 + (ushort)(num % 10))).ToString();
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Core.Helper
|
||||||
|
{
|
||||||
|
public class ShellHelper
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// linux 系统命令
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string Bash(string command)
|
||||||
|
{
|
||||||
|
var escapedArgs = command.Replace("\"", "\\\"");
|
||||||
|
var process = new Process()
|
||||||
|
{
|
||||||
|
StartInfo = new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = "/bin/bash",
|
||||||
|
Arguments = $"-c \"{escapedArgs}\"",
|
||||||
|
RedirectStandardOutput = true,
|
||||||
|
UseShellExecute = false,
|
||||||
|
CreateNoWindow = true,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
process.Start();
|
||||||
|
string result = process.StandardOutput.ReadToEnd();
|
||||||
|
process.WaitForExit();
|
||||||
|
process.Dispose();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// windows系统命令
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fileName"></param>
|
||||||
|
/// <param name="args"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string Cmd(string fileName, string args)
|
||||||
|
{
|
||||||
|
string output = string.Empty;
|
||||||
|
|
||||||
|
var info = new ProcessStartInfo();
|
||||||
|
info.FileName = fileName;
|
||||||
|
info.Arguments = args;
|
||||||
|
info.RedirectStandardOutput = true;
|
||||||
|
|
||||||
|
using (var process = Process.Start(info))
|
||||||
|
{
|
||||||
|
output = process.StandardOutput.ReadToEnd();
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -84,7 +84,8 @@ namespace Yi.Framework.Core.Helper
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="format">格式-默认为N</param>
|
/// <param name="format">格式-默认为N</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetGUID(string format="N") {
|
public static string GetGUID(string format = "N")
|
||||||
|
{
|
||||||
return Guid.NewGuid().ToString(format);
|
return Guid.NewGuid().ToString(format);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -102,9 +103,10 @@ namespace Yi.Framework.Core.Helper
|
|||||||
/// <param name="resourceStr"></param>
|
/// <param name="resourceStr"></param>
|
||||||
/// <param name="length"></param>
|
/// <param name="length"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetCusLine(string resourceStr, int length) {
|
public static string GetCusLine(string resourceStr, int length)
|
||||||
|
{
|
||||||
string[] arrStr = resourceStr.Split("\r\n");
|
string[] arrStr = resourceStr.Split("\r\n");
|
||||||
return string.Join("", (from q in arrStr select q).Skip(arrStr.Length - length + 1).Take(length).ToArray());
|
return string.Join("", (from q in arrStr select q).Skip(arrStr.Length - length + 1).Take(length).ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
if (list is not null && list.Count > 0)
|
if (list is not null && list.Count > 0)
|
||||||
{
|
{
|
||||||
IList<T> result = new List<T>();
|
IList<T> result = new List<T>();
|
||||||
long pid = list.Min(m => (m as ITreeModel<T>)!.ParentId);
|
Guid pid = list.Min(m => (m as ITreeModel<T>)!.ParentId);
|
||||||
IList<T> t = list.Where(m => (m as ITreeModel<T>)!.ParentId == pid).ToList();
|
IList<T> t = list.Where(m => (m as ITreeModel<T>)!.ParentId == pid).ToList();
|
||||||
foreach (T model in t)
|
foreach (T model in t)
|
||||||
{
|
{
|
||||||
@@ -22,7 +22,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
action(model);
|
action(model);
|
||||||
}
|
}
|
||||||
result.Add(model);
|
result.Add(model);
|
||||||
var item = (model as ITreeModel<T>);
|
var item = model as ITreeModel<T>;
|
||||||
IList<T> children = list.Where(m => (m as ITreeModel<T>)!.ParentId == item!.Id).ToList();
|
IList<T> children = list.Where(m => (m as ITreeModel<T>)!.ParentId == item!.Id).ToList();
|
||||||
if (children.Count > 0)
|
if (children.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -35,7 +35,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
}
|
}
|
||||||
private static void SetTreeChildren<T>(IList<T> list, IList<T> children, T model, Action<T> action = null!)
|
private static void SetTreeChildren<T>(IList<T> list, IList<T> children, T model, Action<T> action = null!)
|
||||||
{
|
{
|
||||||
var mm = (model as ITreeModel<T>);
|
var mm = model as ITreeModel<T>;
|
||||||
mm!.Children = new List<T>();
|
mm!.Children = new List<T>();
|
||||||
foreach (T item in children)
|
foreach (T item in children)
|
||||||
{
|
{
|
||||||
@@ -44,7 +44,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
action(item);
|
action(item);
|
||||||
}
|
}
|
||||||
mm.Children.Add(item);
|
mm.Children.Add(item);
|
||||||
var _item = (item as ITreeModel<T>);
|
var _item = item as ITreeModel<T>;
|
||||||
IList<T> _children = list.Where(m => (m as ITreeModel<T>)!.ParentId == _item!.Id).ToList();
|
IList<T> _children = list.Where(m => (m as ITreeModel<T>)!.ParentId == _item!.Id).ToList();
|
||||||
if (_children.Count > 0)
|
if (_children.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -57,8 +57,8 @@ namespace Yi.Framework.Core.Helper
|
|||||||
|
|
||||||
public interface ITreeModel<T>
|
public interface ITreeModel<T>
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public long ParentId { get; set; }
|
public Guid ParentId { get; set; }
|
||||||
public int OrderNum { get; set; }
|
public int OrderNum { get; set; }
|
||||||
|
|
||||||
public List<T>? Children { get; set; }
|
public List<T>? Children { get; set; }
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
namespace Yi.Framework.Core.Helper
|
namespace Yi.Framework.Core.Helper
|
||||||
{
|
{
|
||||||
public class UrlHelper
|
public class UrlHelper
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// UrlEncode编码
|
/// UrlEncode编码
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="url">url</param>
|
/// <param name="url">url</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string UrlEncode(string url) {
|
public static string UrlEncode(string url)
|
||||||
return System.Web.HttpUtility.UrlEncode(url, System.Text.Encoding.UTF8);
|
{
|
||||||
|
return System.Web.HttpUtility.UrlEncode(url, System.Text.Encoding.UTF8);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// UrlEncode解码
|
/// UrlEncode解码
|
||||||
@@ -37,7 +37,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
/// <typeparam name="T"></typeparam>
|
/// <typeparam name="T"></typeparam>
|
||||||
/// <param name="xml"></param>
|
/// <param name="xml"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static T ParseFormByXml<T>(string xml,string rootName="root")
|
public static T ParseFormByXml<T>(string xml, string rootName = "root")
|
||||||
{
|
{
|
||||||
XmlSerializer serializer = new XmlSerializer(typeof(T), new XmlRootAttribute(rootName));
|
XmlSerializer serializer = new XmlSerializer(typeof(T), new XmlRootAttribute(rootName));
|
||||||
StringReader reader = new StringReader(xml);
|
StringReader reader = new StringReader(xml);
|
||||||
@@ -45,7 +45,7 @@ namespace Yi.Framework.Core.Helper
|
|||||||
T res = (T)serializer.Deserialize(reader)!;
|
T res = (T)serializer.Deserialize(reader)!;
|
||||||
reader.Close();
|
reader.Close();
|
||||||
reader.Dispose();
|
reader.Dispose();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
|
using System.Text;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Core.Modularity;
|
||||||
|
|
||||||
|
[Dependency(ReplaceServices =true)]
|
||||||
|
public class YiModuleManager : ModuleManager, IModuleManager, ISingletonDependency
|
||||||
|
{
|
||||||
|
private readonly IModuleContainer _moduleContainer;
|
||||||
|
private readonly IEnumerable<IModuleLifecycleContributor> _lifecycleContributors;
|
||||||
|
private readonly ILogger<YiModuleManager> _logger;
|
||||||
|
|
||||||
|
public YiModuleManager(IModuleContainer moduleContainer, ILogger<YiModuleManager> logger, IOptions<AbpModuleLifecycleOptions> options, IServiceProvider serviceProvider) : base(moduleContainer, logger, options, serviceProvider)
|
||||||
|
{
|
||||||
|
_moduleContainer = moduleContainer;
|
||||||
|
_logger = logger;
|
||||||
|
_lifecycleContributors = options.Value.Contributors.Select(serviceProvider.GetRequiredService).Cast<IModuleLifecycleContributor>().ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async Task InitializeModulesAsync(ApplicationInitializationContext context)
|
||||||
|
{
|
||||||
|
|
||||||
|
_logger.LogDebug("==========模块Initialize初始化统计-跳过0ms模块==========");
|
||||||
|
var total = 0;
|
||||||
|
var watch =new Stopwatch();
|
||||||
|
long totalTime = 0;
|
||||||
|
foreach (var contributor in _lifecycleContributors)
|
||||||
|
{
|
||||||
|
foreach (var module in _moduleContainer.Modules)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
watch.Restart();
|
||||||
|
await contributor.InitializeAsync(context, module.Instance);
|
||||||
|
watch.Stop();
|
||||||
|
totalTime += watch.ElapsedMilliseconds;
|
||||||
|
total++;
|
||||||
|
if (watch.ElapsedMilliseconds > 1)
|
||||||
|
{
|
||||||
|
_logger.LogDebug($"耗时-{watch.ElapsedMilliseconds}ms,已加载模块-{module.Assembly.GetName().Name}");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new AbpInitializationException($"An error occurred during the initialize {contributor.GetType().FullName} phase of the module {module.Type.AssemblyQualifiedName}: {ex.Message}. See the inner exception for details.", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_logger.LogInformation($"==========【{total}】个模块初始化执行完毕,总耗时【{totalTime}ms】==========");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.Core" Version="$(AbpVersion)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
using Volo.Abp.Modularity;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Core
|
||||||
|
{
|
||||||
|
public class YiFrameworkCoreModule:AbpModule
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using Volo.Abp;
|
||||||
|
using Volo.Abp.Application.Services;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Ddd.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IDeletesAppService<in TKey> : IDeleteAppService< TKey> , IApplicationService, IRemoteService
|
||||||
|
{
|
||||||
|
Task DeleteAsync(IEnumerable<TKey> ids);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using Volo.Abp.Application.Dtos;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Ddd.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IPageTimeResultRequestDto : IPagedAndSortedResultRequest
|
||||||
|
{
|
||||||
|
DateTime? StartTime { get; set; }
|
||||||
|
DateTime? EndTime { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
using Volo.Abp.Application.Dtos;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Ddd.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IPagedAllResultRequestDto : IPageTimeResultRequestDto, IPagedAndSortedResultRequest
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Volo.Abp.Application.Services;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Ddd.Application.Contracts
|
||||||
|
{
|
||||||
|
public interface IYiCrudAppService<TEntityDto, in TKey> : ICrudAppService<TEntityDto, TKey>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IYiCrudAppService<TEntityDto, in TKey, in TGetListInput> : ICrudAppService<TEntityDto, TKey, TGetListInput>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IYiCrudAppService<TEntityDto, in TKey, in TGetListInput, in TCreateInput> : ICrudAppService<TEntityDto, TKey, TGetListInput, TCreateInput>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IYiCrudAppService<TEntityDto, in TKey, in TGetListInput, in TCreateInput, in TUpdateInput> : ICrudAppService<TEntityDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IYiCrudAppService<TGetOutputDto, TGetListOutputDto, in TKey, in TGetListInput, in TCreateInput, in TUpdateInput> : ICrudAppService<TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>, IDeletesAppService<TKey>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,8 @@
|
|||||||
using System;
|
using Volo.Abp.Application.Dtos;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Yi.Framework.Ddd.Dtos.Abstract;
|
|
||||||
using Yi.Framework.Ddd.Services.Abstract;
|
|
||||||
|
|
||||||
namespace Yi.Framework.Ddd.Dtos
|
namespace Yi.Framework.Ddd.Application.Contracts
|
||||||
{
|
{
|
||||||
public class PagedAllResultRequestDto : PagedAndSortedResultRequestDto, IPagedAllResultRequestDto, IPagedAndSortedResultRequestDto, IPageTimeResultRequestDto
|
public class PagedAllResultRequestDto : PagedAndSortedResultRequestDto, IPagedAllResultRequestDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询开始时间条件
|
/// 查询开始时间条件
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="$(AbpVersion)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Yi.Framework.Core\Yi.Framework.Core.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using Volo.Abp.Application;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Ddd.Application.Contracts
|
||||||
|
{
|
||||||
|
[DependsOn(typeof(AbpDddApplicationContractsModule))]
|
||||||
|
public class YiFrameworkDddApplicationContractsModule : AbpModule
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<Import Project="..\..\common.props" />
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="MiniExcel" Version="1.31.3" />
|
||||||
|
<PackageReference Include="Volo.Abp.Ddd.Application" Version="$(AbpVersion)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Yi.Framework.Ddd.Application.Contracts\Yi.Framework.Ddd.Application.Contracts.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
using Volo.Abp.Application.Dtos;
|
||||||
|
using Volo.Abp.Caching;
|
||||||
|
using Volo.Abp.Domain.Entities;
|
||||||
|
using Volo.Abp.Domain.Repositories;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Ddd.Application
|
||||||
|
{
|
||||||
|
public abstract class YiCacheCrudAppService<TEntity, TEntityDto, TKey> : YiCrudAppService<TEntity, TEntityDto, TKey, PagedAndSortedResultRequestDto>
|
||||||
|
where TEntity : class, IEntity<TKey>
|
||||||
|
where TEntityDto : IEntityDto<TKey>
|
||||||
|
{
|
||||||
|
protected YiCacheCrudAppService(IRepository<TEntity, TKey> repository) : base(repository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class YiCacheCrudAppService<TEntity, TEntityDto, TKey, TGetListInput>
|
||||||
|
: YiCrudAppService<TEntity, TEntityDto, TKey, TGetListInput, TEntityDto>
|
||||||
|
where TEntity : class, IEntity<TKey>
|
||||||
|
where TEntityDto : IEntityDto<TKey>
|
||||||
|
{
|
||||||
|
protected YiCacheCrudAppService(IRepository<TEntity, TKey> repository) : base(repository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public abstract class YiCacheCrudAppService<TEntity, TEntityDto, TKey, TGetListInput, TCreateInput>
|
||||||
|
: YiCrudAppService<TEntity, TEntityDto, TKey, TGetListInput, TCreateInput, TCreateInput>
|
||||||
|
where TEntity : class, IEntity<TKey>
|
||||||
|
where TEntityDto : IEntityDto<TKey>
|
||||||
|
{
|
||||||
|
protected YiCacheCrudAppService(IRepository<TEntity, TKey> repository) : base(repository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class YiCacheCrudAppService<TEntity, TEntityDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
|
||||||
|
: YiCrudAppService<TEntity, TEntityDto, TEntityDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
|
||||||
|
where TEntity : class, IEntity<TKey>
|
||||||
|
where TEntityDto : IEntityDto<TKey>
|
||||||
|
{
|
||||||
|
protected YiCacheCrudAppService(IRepository<TEntity, TKey> repository) : base(repository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public abstract class YiCacheCrudAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
|
||||||
|
: YiCrudAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
|
||||||
|
where TEntity : class, IEntity<TKey>
|
||||||
|
where TGetOutputDto : IEntityDto<TKey>
|
||||||
|
where TGetListOutputDto : IEntityDto<TKey>
|
||||||
|
{
|
||||||
|
protected IDistributedCache<TEntity> Cache => LazyServiceProvider.LazyGetRequiredService<IDistributedCache<TEntity>>();
|
||||||
|
|
||||||
|
protected string GetCacheKey(TKey id) => typeof(TEntity).Name + ":" + CurrentTenant.Id ?? Guid.Empty + ":" + id.ToString();
|
||||||
|
protected YiCacheCrudAppService(IRepository<TEntity, TKey> repository) : base(repository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async Task<TGetOutputDto> UpdateAsync(TKey id, TUpdateInput input)
|
||||||
|
{
|
||||||
|
var output = await base.UpdateAsync(id, input);
|
||||||
|
await Cache.RemoveAsync(GetCacheKey(id));
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async Task<PagedResultDto<TGetListOutputDto>> GetListAsync(TGetListInput input)
|
||||||
|
{
|
||||||
|
//两种方式:
|
||||||
|
//1:全表缓存,使用缓存直接查询
|
||||||
|
//2:非全部缓存,查询到的数据直接添加到缓存
|
||||||
|
|
||||||
|
//判断是否该实体为全表缓存
|
||||||
|
throw new NotImplementedException();
|
||||||
|
|
||||||
|
//IDistributedCache 有局限性,条件查询无法进行缓存了
|
||||||
|
//if (true)
|
||||||
|
//{
|
||||||
|
// return await GetListByCacheAsync(input);
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// return await GetListByDbAsync(input);
|
||||||
|
//}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual async Task<PagedResultDto<TGetListOutputDto>> GetListByDbAsync(TGetListInput input)
|
||||||
|
{
|
||||||
|
//如果不是全表缓存,可以走这个啦
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
protected virtual async Task<PagedResultDto<TGetListOutputDto>> GetListByCacheAsync(TGetListInput input)
|
||||||
|
{
|
||||||
|
//如果是全表缓存,可以走这个啦
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override async Task<TEntity> GetEntityByIdAsync(TKey id)
|
||||||
|
{
|
||||||
|
var output = await Cache.GetOrAddAsync(GetCacheKey(id), async () => await base.GetEntityByIdAsync(id));
|
||||||
|
return output!;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async Task DeleteAsync(IEnumerable<TKey> id)
|
||||||
|
{
|
||||||
|
await base.DeleteAsync(id);
|
||||||
|
foreach (var itemId in id)
|
||||||
|
{
|
||||||
|
await Cache.RemoveAsync(GetCacheKey(itemId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using MiniExcelLibs;
|
||||||
|
using Volo.Abp;
|
||||||
|
using Volo.Abp.Application.Dtos;
|
||||||
|
using Volo.Abp.Application.Services;
|
||||||
|
using Volo.Abp.Domain.Entities;
|
||||||
|
using Volo.Abp.Domain.Repositories;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Ddd.Application
|
||||||
|
{
|
||||||
|
public abstract class YiCrudAppService<TEntity, TEntityDto, TKey> : YiCrudAppService<TEntity, TEntityDto, TKey, PagedAndSortedResultRequestDto>
|
||||||
|
where TEntity : class, IEntity<TKey>
|
||||||
|
where TEntityDto : IEntityDto<TKey>
|
||||||
|
{
|
||||||
|
protected YiCrudAppService(IRepository<TEntity, TKey> repository) : base(repository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class YiCrudAppService<TEntity, TEntityDto, TKey, TGetListInput>
|
||||||
|
: YiCrudAppService<TEntity, TEntityDto, TKey, TGetListInput, TEntityDto>
|
||||||
|
where TEntity : class, IEntity<TKey>
|
||||||
|
where TEntityDto : IEntityDto<TKey>
|
||||||
|
{
|
||||||
|
protected YiCrudAppService(IRepository<TEntity, TKey> repository) : base(repository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public abstract class YiCrudAppService<TEntity, TEntityDto, TKey, TGetListInput, TCreateInput>
|
||||||
|
: YiCrudAppService<TEntity, TEntityDto, TKey, TGetListInput, TCreateInput, TCreateInput>
|
||||||
|
where TEntity : class, IEntity<TKey>
|
||||||
|
where TEntityDto : IEntityDto<TKey>
|
||||||
|
{
|
||||||
|
protected YiCrudAppService(IRepository<TEntity, TKey> repository) : base(repository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class YiCrudAppService<TEntity, TEntityDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
|
||||||
|
: YiCrudAppService<TEntity, TEntityDto, TEntityDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
|
||||||
|
where TEntity : class, IEntity<TKey>
|
||||||
|
where TEntityDto : IEntityDto<TKey>
|
||||||
|
{
|
||||||
|
protected YiCrudAppService(IRepository<TEntity, TKey> repository) : base(repository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public abstract class YiCrudAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
|
||||||
|
: CrudAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
|
||||||
|
where TEntity : class, IEntity<TKey>
|
||||||
|
where TGetOutputDto : IEntityDto<TKey>
|
||||||
|
where TGetListOutputDto : IEntityDto<TKey>
|
||||||
|
{
|
||||||
|
protected YiCrudAppService(IRepository<TEntity, TKey> repository) : base(repository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 多查
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override async Task<PagedResultDto<TGetListOutputDto>> GetListAsync(TGetListInput input)
|
||||||
|
{
|
||||||
|
List<TEntity>? entites = null;
|
||||||
|
//区分多查还是批量查
|
||||||
|
if (input is IPagedResultRequest pagedInput)
|
||||||
|
{
|
||||||
|
entites = await Repository.GetPagedListAsync(pagedInput.SkipCount, pagedInput.MaxResultCount, string.Empty);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
entites = await Repository.GetListAsync();
|
||||||
|
}
|
||||||
|
var total = await Repository.GetCountAsync();
|
||||||
|
var output = await MapToGetListOutputDtosAsync(entites);
|
||||||
|
return new PagedResultDto<TGetListOutputDto>(total, output);
|
||||||
|
//throw new NotImplementedException($"【{typeof(TEntity)}】实体的CrudAppService,查询为具体业务,通用查询几乎无实际场景,请重写实现!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 多删
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[RemoteService(isEnabled: true)]
|
||||||
|
public virtual async Task DeleteAsync(IEnumerable<TKey> id)
|
||||||
|
{
|
||||||
|
await Repository.DeleteManyAsync(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 偷梁换柱
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[RemoteService(isEnabled: false)]
|
||||||
|
public override Task DeleteAsync(TKey id)
|
||||||
|
{
|
||||||
|
return base.DeleteAsync(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 导出excel
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public virtual async Task<IActionResult> GetExportExcelAsync(TGetListInput input)
|
||||||
|
{
|
||||||
|
if (input is IPagedResultRequest paged)
|
||||||
|
{
|
||||||
|
paged.SkipCount = 0;
|
||||||
|
paged.MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
var output = await this.GetListAsync(input);
|
||||||
|
var dirPath = $"/wwwroot/temp";
|
||||||
|
|
||||||
|
var fileName = $"{typeof(TEntity).Name}_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}_{Guid.NewGuid()}";
|
||||||
|
var filePath = $"{dirPath}/{fileName}.xlsx";
|
||||||
|
if (!Directory.Exists(dirPath))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(dirPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
MiniExcel.SaveAs(filePath, output.Items);
|
||||||
|
return new PhysicalFileResult(filePath, "application/vnd.ms-excel");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 导入excle
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public virtual async Task PostImportExcelAsync(List<TCreateInput> input)
|
||||||
|
{
|
||||||
|
var entities = input.Select(x => MapToEntity(x)).ToList();
|
||||||
|
//安全起见,该接口需要自己实现
|
||||||
|
throw new NotImplementedException();
|
||||||
|
//await Repository.DeleteManyAsync(entities.Select(x => x.Id));
|
||||||
|
//await Repository.InsertManyAsync(entities);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using Volo.Abp;
|
||||||
|
using Volo.Abp.Application;
|
||||||
|
using Volo.Abp.Application.Dtos;
|
||||||
|
using Volo.Abp.Modularity;
|
||||||
|
using Yi.Framework.Ddd.Application.Contracts;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Ddd.Application
|
||||||
|
{
|
||||||
|
[DependsOn(typeof(AbpDddApplicationModule),
|
||||||
|
typeof(YiFrameworkDddApplicationContractsModule))]
|
||||||
|
public class YiFrameworkDddApplicationModule : AbpModule
|
||||||
|
{
|
||||||
|
public override void OnApplicationInitialization(ApplicationInitializationContext context)
|
||||||
|
{
|
||||||
|
//分页限制
|
||||||
|
LimitedResultRequestDto.DefaultMaxResultCount = 10;
|
||||||
|
LimitedResultRequestDto.MaxMaxResultCount = 10000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Mapster;
|
||||||
|
using Volo.Abp.ObjectMapping;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Mapster
|
||||||
|
{
|
||||||
|
public class MapsterAutoObjectMappingProvider : IAutoObjectMappingProvider
|
||||||
|
{
|
||||||
|
public TDestination Map<TSource, TDestination>(object source)
|
||||||
|
{
|
||||||
|
var sss = typeof(TDestination).Name;
|
||||||
|
return source.Adapt<TDestination>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public TDestination Map<TSource, TDestination>(TSource source, TDestination destination)
|
||||||
|
{
|
||||||
|
return source.Adapt<TSource, TDestination>(destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user