├── DBSharding.Test
├── App.config
├── DBSharding.Test.csproj
├── DBSharding.Test.csproj.user
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── SheepAspect.config
├── SheepAspectConfig.xsd
├── User.cs
├── UserRepertory.cs
├── bin
│ └── Debug
│ │ ├── Antlr3.Runtime.dll
│ │ ├── DBSharding.Test.exe
│ │ ├── DBSharding.Test.exe.config
│ │ ├── DBSharding.Test.exe.pdb
│ │ ├── DBSharding.Test.pdb
│ │ ├── DBSharding.Test.vshost.exe
│ │ ├── DBSharding.Test.vshost.exe.config
│ │ ├── DBSharding.Test.vshost.exe.manifest
│ │ ├── DBSharding.dll
│ │ ├── DBSharding.pdb
│ │ ├── DBSharding2.dll.pdb
│ │ ├── Dapper.dll
│ │ ├── Dapper.xml
│ │ ├── Mono.Cecil.Mdb.dll
│ │ ├── Mono.Cecil.Pdb.dll
│ │ ├── Mono.Cecil.Rocks.dll
│ │ ├── Mono.Cecil.dll
│ │ ├── MySql.Data.dll
│ │ ├── SheepAspect.config
│ │ ├── SheepAspect.dll
│ │ └── SheepAspect.xml
├── obj
│ └── Debug
│ │ ├── DBSharding.Test.csproj.FileListAbsolute.txt
│ │ ├── DBSharding.Test.csprojResolveAssemblyReference.cache
│ │ ├── DBSharding.Test.exe
│ │ ├── DBSharding.Test.pdb
│ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
└── packages.config
├── DBSharding.sln
├── DBSharding
├── Advice.cs
├── DBSharding.csproj
├── Properties
│ └── AssemblyInfo.cs
├── ShardingConnUtils.cs
├── ShardingCore.cs
├── ShardingKeyAttribute.cs
├── ShardingMode.cs
├── ShardingModeAttribute.cs
├── bin
│ └── Debug
│ │ ├── Antlr3.Runtime.dll
│ │ ├── DBSharding.dll
│ │ ├── DBSharding.pdb
│ │ ├── Mono.Cecil.Mdb.dll
│ │ ├── Mono.Cecil.Pdb.dll
│ │ ├── Mono.Cecil.Rocks.dll
│ │ ├── Mono.Cecil.dll
│ │ ├── SheepAspect.dll
│ │ └── SheepAspect.xml
├── obj
│ └── Debug
│ │ ├── DBSharding.csproj.FileListAbsolute.txt
│ │ ├── DBSharding.csprojResolveAssemblyReference.cache
│ │ ├── DBSharding.dll
│ │ ├── DBSharding.pdb
│ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
└── packages.config
├── README.md
└── packages
├── Dapper.1.50.2
├── Dapper.1.50.2.nupkg
└── lib
│ ├── net40
│ ├── Dapper.dll
│ └── Dapper.xml
│ ├── net45
│ ├── Dapper.dll
│ └── Dapper.xml
│ ├── net451
│ ├── Dapper.dll
│ └── Dapper.xml
│ └── netstandard1.3
│ ├── Dapper.dll
│ └── Dapper.xml
├── Mono.Cecil.0.9.5.0
├── Mono.Cecil.0.9.5.0.nupkg
└── lib
│ ├── net20
│ ├── Mono.Cecil.Mdb.dll
│ ├── Mono.Cecil.Pdb.dll
│ └── Mono.Cecil.dll
│ ├── net35
│ ├── Mono.Cecil.Mdb.dll
│ ├── Mono.Cecil.Pdb.dll
│ ├── Mono.Cecil.Rocks.dll
│ └── Mono.Cecil.dll
│ ├── net40
│ ├── Mono.Cecil.Mdb.dll
│ ├── Mono.Cecil.Pdb.dll
│ ├── Mono.Cecil.Rocks.dll
│ └── Mono.Cecil.dll
│ └── sl40
│ ├── Mono.Cecil.Rocks.dll
│ └── Mono.Cecil.dll
├── MySql.Data.6.9.9
├── CHANGES
├── MySql.Data.6.9.9.nupkg
├── Readme.txt
├── content
│ ├── app.config.transform
│ └── web.config.transform
└── lib
│ ├── net40
│ └── MySql.Data.dll
│ └── net45
│ └── MySql.Data.dll
└── SheepAspect.0.3.0.15
├── Content
├── Aspects
│ └── SampleAspect.cs.pp
├── SheepAspect.config.pp
└── SheepAspectConfig.xsd
├── Lib
├── Antlr3.Runtime.dll
├── SheepAspect.XML
└── SheepAspect.dll
├── SheepAspect.0.3.0.15.nupkg
└── Tools
├── SheepAspect.Targets
├── SheepAspect.Tasks.dll
├── SheepAspectQueryAnalyzer.exe
├── install.ps1
└── uninstall.ps1
/DBSharding.Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/DBSharding.Test/DBSharding.Test.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {36F1D3CA-3400-4B67-9445-F7BF5D575084}
8 | Exe
9 | Properties
10 | DBSharding.Test
11 | DBSharding.Test
12 | v4.5.1
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 | ..\packages\SheepAspect.0.3.0.15\Lib\Antlr3.Runtime.dll
38 | True
39 |
40 |
41 | ..\packages\Dapper.1.50.2\lib\net451\Dapper.dll
42 | True
43 |
44 |
45 | ..\packages\Mono.Cecil.0.9.5.0\lib\net40\Mono.Cecil.dll
46 | True
47 |
48 |
49 | ..\packages\Mono.Cecil.0.9.5.0\lib\net40\Mono.Cecil.Mdb.dll
50 | True
51 |
52 |
53 | ..\packages\Mono.Cecil.0.9.5.0\lib\net40\Mono.Cecil.Pdb.dll
54 | True
55 |
56 |
57 | ..\packages\Mono.Cecil.0.9.5.0\lib\net40\Mono.Cecil.Rocks.dll
58 | True
59 |
60 |
61 | ..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll
62 | True
63 |
64 |
65 | ..\packages\SheepAspect.0.3.0.15\Lib\SheepAspect.dll
66 | True
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | Always
89 |
90 |
91 | Designer
92 |
93 |
94 |
95 |
96 | {51e4655e-e2ce-4a02-afc4-3a9dd4557919}
97 | DBSharding
98 |
99 |
100 |
101 |
102 |
109 |
--------------------------------------------------------------------------------
/DBSharding.Test/DBSharding.Test.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ProjectFiles
5 |
6 |
--------------------------------------------------------------------------------
/DBSharding.Test/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using MySql.Data.MySqlClient;
10 |
11 | namespace DBSharding.Test
12 | {
13 | class Program
14 | {
15 | static void Main(string[] args)
16 | {
17 | //注册数据库连接
18 | IDbConnection db0 = new MySqlConnection(ConfigurationManager.ConnectionStrings["db0"].ConnectionString);
19 | IDbConnection db1 = new MySqlConnection(ConfigurationManager.ConnectionStrings["db1"].ConnectionString);
20 | IDbConnection db2 = new MySqlConnection(ConfigurationManager.ConnectionStrings["db2"].ConnectionString);
21 |
22 | Dictionary connectionDic = new Dictionary();
23 | connectionDic.Add("0", db0);
24 | connectionDic.Add("1", db1);
25 | connectionDic.Add("2", db2);
26 |
27 | ShardingConnUtils.RegisConnGroup(connectionDic);
28 |
29 |
30 | //测试
31 | User user = new User();
32 | user.Id = 3;
33 | user.UserName = "alan";
34 |
35 | UserRepertory userRepertory = new UserRepertory();
36 | userRepertory.AddUser(user);
37 |
38 | User user2 = userRepertory.GetUserById(3);
39 | Console.WriteLine(user2.UserName);
40 |
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/DBSharding.Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("DBSharding.Test")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DBSharding.Test")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("36f1d3ca-3400-4b67-9445-f7bf5d575084")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/DBSharding.Test/SheepAspect.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DBSharding.dll
6 |
7 |
8 |
9 |
10 | DBSharding.Test.exe
11 |
12 |
13 |
--------------------------------------------------------------------------------
/DBSharding.Test/SheepAspectConfig.xsd:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | There are 3 possible combinations of assemblies
34 | 1 - file only: SheepAspect will read the assembly from the .exe or .dll file.
35 | 2 - files: SheepAspect will find all files matching the specified pattern under the specified directory
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/DBSharding.Test/User.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace DBSharding.Test
8 | {
9 | public class User
10 | {
11 | public int Id { get; set; }
12 |
13 | public string UserName { get; set; }
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/DBSharding.Test/UserRepertory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using Dapper;
8 | using DBSharding;
9 |
10 | namespace DBSharding.Test
11 | {
12 | public class UserRepertory
13 | {
14 |
15 | [ShardingMode(ShardingMode = ShardingMode.Mod, TableCount = 3)]
16 | public bool AddUser([ShardingKey(Keys = "Id")]User user)
17 | {
18 | IDbConnection connection = ShardingConnUtils.GetConnection(); //侵入代码,但也仅此一行,无论怎样,数据库操作都是要获取数据库连接
19 |
20 | int count = connection.Execute("insert into user value(@Id,@UserName)", user);
21 | return count > 0;
22 | }
23 |
24 | [ShardingMode(ShardingMode = ShardingMode.Mod, TableCount = 3)]
25 | public User GetUserById([ShardingKey]int Id)
26 | {
27 | IDbConnection connection = ShardingConnUtils.GetConnection();
28 |
29 | List users = connection.Query("select * from user where Id=@Id", new { Id = Id }).ToList();
30 |
31 | if (users.Count > 0)
32 | {
33 | return users[0];
34 | }
35 | return null;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/Antlr3.Runtime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/Antlr3.Runtime.dll
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/DBSharding.Test.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/DBSharding.Test.exe
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/DBSharding.Test.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/DBSharding.Test.exe.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/DBSharding.Test.exe.pdb
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/DBSharding.Test.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/DBSharding.Test.pdb
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/DBSharding.Test.vshost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/DBSharding.Test.vshost.exe
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/DBSharding.Test.vshost.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/DBSharding.Test.vshost.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/DBSharding.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/DBSharding.dll
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/DBSharding.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/DBSharding.pdb
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/DBSharding2.dll.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/DBSharding2.dll.pdb
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/Dapper.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/Dapper.dll
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/Mono.Cecil.Mdb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/Mono.Cecil.Mdb.dll
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/Mono.Cecil.Pdb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/Mono.Cecil.Pdb.dll
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/Mono.Cecil.Rocks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/Mono.Cecil.Rocks.dll
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/Mono.Cecil.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/Mono.Cecil.dll
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/MySql.Data.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/MySql.Data.dll
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/SheepAspect.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DBSharding.dll
6 |
7 |
8 |
9 |
10 | DBSharding.Test.exe
11 |
12 |
13 |
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/SheepAspect.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/bin/Debug/SheepAspect.dll
--------------------------------------------------------------------------------
/DBSharding.Test/bin/Debug/SheepAspect.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SheepAspect
5 |
6 |
7 |
8 |
9 | Indicate that an aspect class will always be instantiated for every advice execution. Not recommended.
10 |
11 |
12 |
13 |
14 | Indicate that a class is a SheepAspect aspect class. By default, this attribute is the same as .
15 |
16 |
17 |
18 |
19 | Produces a
20 |
21 | Example:
22 |
23 | [SelectPropertyMethods("Getter & Name:'Is*' & InType:Namespace:'Foo.Bar.*")]
24 | public void FooGettersPointcut(){}
25 |
26 |
27 |
28 |
29 |
30 |
31 | Initializes a new instance of this class.
32 |
33 | SAQL for
34 |
35 |
36 |
37 | This advice statically adds attributes to target types, methods, properties, fields, etc.
38 |
39 | Example, to add [Foo(Bar="sheep")] and [Boom("Blah")] attributes into all properties matched by "SomePropertiesPointcut":
40 |
41 | [DeclareAttributes("SomePropertiesPointcut")]
42 | [Foo(Bar="sheep")]
43 | [Boom("Blah")]
44 | public object DummyMeaninglessProperty {get; set;}
45 |
46 |
47 |
48 |
49 |
50 |
51 | Initializes a new instance of this class.
52 | Accepts: , , , , , .
53 |
54 | Names of target pointcuts
55 |
56 |
57 |
58 | Add interface implementations to existing types.
59 | Attaching on a factory method:
60 |
61 | [DeclareMixins("TypePointcutName")]
62 | public <T:interface> FooMethod(<optional T:object> instance)
63 | {
64 | return new InterfaceImplementation();
65 | }
66 |
67 |
68 | Attaching on a field:
69 |
70 | [DeclareMixins("TypePointcutName")]
71 | public <T:interface> FooField;
72 |
73 |
74 |
75 |
76 |
77 |
78 | Initializes a new instance of this class.
79 | Accepts: .
80 |
81 | Names of target s.
82 |
83 |
84 |
85 | Other interface types to be mixed-in into the target type.
86 | Make sure the implementation returned by this advice also implements this interface.
87 |
88 |
89 |
90 |
91 | If set to true, each target instance will only inquire this aspect once to retrieve a mixin implementation.
92 | All subsequent invocations on that instance will be directed to the same mixin implementation reference.
93 | Set to false to inquire this aspect on every invocation.
94 | Default is true on methods, or false on fields.
95 |
96 |
97 |
98 |
99 | Produces a matching type constructors
100 |
101 | Example:
102 |
103 | [SelectConstructors("InType:Namespace:'Foo.Bar.*" & Args:[Implements:Name:'I*Repository', 'System.String'])]
104 | public void FooConstructorsPointcut(){}
105 |
106 |
107 |
108 |
109 |
110 |
111 | Initializes a new instance of this class.
112 |
113 | SAQL expression for
114 |
115 |
116 |
117 | Specify type for this aspect class.
118 | Aspect class without this attribute will use the value defined in ...
119 |
120 |
121 |
122 |
123 | Initializes a new class of this class.
124 |
125 | The implementation type of . It must have a public default constructor.
126 |
127 |
128 |
129 | Weavers with lower priority values will get processed earlier during compilation
130 | This is useful to ensure certain weavers only get executed after all others, hence ensuring it will not get overruled by accident
131 |
132 |
133 |
134 |
135 | Indicate that an aspect class will only be instantiated once during the lifetime of the application.
136 |
137 |
138 |
139 |
140 | Indicate that the instance of an aspect class will be associated with the of the jointpoint.
141 |
142 |
143 |
144 |
145 | Optional: name of a pointcut. If specified, the aspect will only be activated (and bound to the This instance) when the selected jointpoints are triggered.
146 | When ommitted, the aspect will be auto-activated on the first instance it's required.
147 | Accepts: , , ,
148 | , , .
149 |
150 |
151 |
152 |
153 | Produces a .
154 |
155 | Example:
156 |
157 | [SelectTypes("Name:'*Service' & Namespace:'Foo.Bar.*")]
158 | public void FooServiceTypesPointcut(){}
159 |
160 |
161 |
162 |
163 |
164 |
165 | Initializes a new instance of this class.
166 |
167 | SAQL for
168 |
169 |
170 |
171 | Initializes a new instance of this class.
172 |
173 | Types to be selected by this
174 |
175 |
176 |
177 | Produces a
178 |
179 | Example:
180 |
181 | [SelectFields("Name:'_is*' & InType:Namespace:'Foo.Bar.*")]
182 | public void FooFieldsPointcut(){}
183 |
184 |
185 |
186 |
187 |
188 |
189 | Initializes a new instance of this class.
190 |
191 | SAQL expression for
192 |
193 |
194 |
195 | Support for @otherPointcut
196 |
197 | The top-level pointcut, in case the reference is invalid and we want the exception to explain the source of the trouble
198 | Aspect that owns the referenced pointcut
199 | Name of the referenced pointcut
200 |
201 |
202 |
203 | Support for @otherPointcut
204 |
205 | The top-level pointcut, in case the reference is invalid and we want the exception to explain the source of the trouble
206 | Aspect that owns the referenced pointcut
207 | Name of the referenced pointcut
208 |
209 |
210 |
211 | Surround the execution of methods, properties, method-calls, field gets/sets instructions, etc.
212 | Usage signature:
213 |
214 | [Around("PointcutName")]
215 | public <void | T:object> FooMethod(<T:IJointPoint> jp) { ... }
216 |
217 |
218 |
219 | Example:
220 |
221 | [Around("FooPointcut")]
222 | public int AroundFooPointcut(MethodJointPoint jointPoint)
223 | {
224 | ....
225 | jointPoint.Execute();
226 | ...
227 | }
228 |
229 |
230 |
231 |
232 |
233 |
234 | Initializes a new instance of this class.
235 | Accepts: , , ,
236 | , , .
237 |
238 | Names of target pointcuts
239 |
240 |
241 |
242 | Advices with lower priority values will be applied first.
243 | Default: 100
244 |
245 |
246 |
247 |
248 | Produces a that maches a code instruction of calling a method.
249 |
250 | Example:
251 |
252 | [SelectCalMethods("Method: (Name:'Execute*' & Type:Name:'*Service')")]
253 | public void ServiceExecuteCallsPointcut(){}
254 |
255 | (The example will match the line emailService.ExecuteSend("Hello World!"); in the code)
256 |
257 |
258 |
259 |
260 |
261 | Initializes new instance of class.
262 |
263 | SAQL expression for
264 |
265 |
266 |
267 | Produces a that maches a code instruction of setting a field.
268 |
269 | Example:
270 |
271 | [SelectSetFields("Field:(Name:'_is*' & InType:Name:'*Service'"))]
272 | public void ServiceFieldSetsPointcut(){}
273 |
274 | (The example will match the line emailService._isActive = true in the code)
275 |
276 |
277 |
278 |
279 |
280 | Initializes new instance of this class.
281 |
282 | SAQL expression for
283 |
284 |
285 |
286 | Produces a that maches a code instruction of getting the value from a field.
287 |
288 | Example:
289 |
290 | [SelectGetFields("Field:(Name:'_is*' & InType:Name:'*Service'"))]
291 | public void ServiceFieldGetsPointcut(){}
292 |
293 | (The example will match the line var isActive = emailService._isActive in the code)
294 |
295 |
296 |
297 |
298 |
299 | Initializes new instance of this class.
300 |
301 | SAQL expression for
302 |
303 |
304 |
305 | Indicate that the instance of an aspect class will live within the span of a particular control flow.
306 | The control flows are defined by the pointcuts passed to the constructor of this attribute.
307 |
308 |
309 |
310 |
311 | Initializes a new class of this class.
312 | Accepts: , , ,
313 | , , .
314 |
315 |
316 | Names of pointcuts that define the control flows that mark the scope of the aspect instance lifetime.
317 |
318 |
319 |
320 |
321 | Produces a
322 |
323 | Example:
324 |
325 | [SelectMethods("Name:'Execute*' & InType:Namespace:'Foo.Bar.*")]
326 | public void FooMethodsPointcut(){}
327 |
328 |
329 |
330 |
331 |
332 |
333 | Initializes a new instance of this class.
334 |
335 | SAQL for
336 |
337 |
338 |
339 | Produces a
340 | To select property's getter and setter methods, see instead
341 |
342 | Example:
343 |
344 | [SelectProperties("Name:'Is*' & InType:Namespace:'Foo.Bar.*")]
345 | public void FooPropertiesPointcut(){}
346 |
347 |
348 |
349 |
350 |
351 |
352 | Initializes a new instance of this class.
353 |
354 | SAQL for
355 |
356 |
357 |
358 |
359 | Indicate that an aspect class will always be instantiated for every advice execution. Not recommended.
360 |
361 |
362 |
363 |
364 | Requires 2 items (object target, object this) in the evaulation stack
365 |
366 | IlProcessor, usually that of the target-method
367 | Args variable for dispatching
368 |
369 |
370 |
371 |
372 | To be appended on the static constructor, initializing static StaticJp field
373 | Already suppied as the first 2 arguments: AdviceInvoker, AdviceCallback
374 |
375 | IL processor of the static constructor
376 |
377 |
378 |
379 | Weavers with lower priority values will get processed earlier during compilation
380 | This is useful to ensure certain weavers only get executed after all others, hence ensuring it will not get overruled by accident
381 | By default: 100
382 |
383 |
384 |
385 |
386 | To be appended on the static constructor, initializing static StaticJp field
387 | Already suppied as the first 2 arguments: AdviceInvoker, AdviceCallback
388 |
389 | IL processor of the static constructor
390 |
391 |
392 |
393 | Weavers with lower priority values will get processed earlier during compilation
394 | This is useful to ensure certain weavers only get executed after all others, hence ensuring it will not get overruled by accident
395 | Priority value of FlowAspectLifecycleWeaver is 900, so it will be executed later than other MethodWeaverBase (by default: 100)
396 |
397 |
398 |
399 |
400 |
--------------------------------------------------------------------------------
/DBSharding.Test/obj/Debug/DBSharding.Test.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\SheepAspect.config
2 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\DBSharding.Test.exe.config
3 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\DBSharding.Test.exe
4 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\DBSharding.Test.pdb
5 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\Antlr3.Runtime.dll
6 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\DBSharding.dll
7 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\Mono.Cecil.dll
8 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\Mono.Cecil.Mdb.dll
9 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\Mono.Cecil.Pdb.dll
10 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\Mono.Cecil.Rocks.dll
11 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\SheepAspect.dll
12 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\DBSharding.pdb
13 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\SheepAspect.xml
14 | D:\Project\DBSharding\DBSharding.Test\obj\Debug\DBSharding.Test.csprojResolveAssemblyReference.cache
15 | D:\Project\DBSharding\DBSharding.Test\obj\Debug\DBSharding.Test.exe
16 | D:\Project\DBSharding\DBSharding.Test\obj\Debug\DBSharding.Test.pdb
17 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\Dapper.dll
18 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\MySql.Data.dll
19 | D:\Project\DBSharding\DBSharding.Test\bin\Debug\Dapper.xml
20 |
--------------------------------------------------------------------------------
/DBSharding.Test/obj/Debug/DBSharding.Test.csprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/obj/Debug/DBSharding.Test.csprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/DBSharding.Test/obj/Debug/DBSharding.Test.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/obj/Debug/DBSharding.Test.exe
--------------------------------------------------------------------------------
/DBSharding.Test/obj/Debug/DBSharding.Test.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/obj/Debug/DBSharding.Test.pdb
--------------------------------------------------------------------------------
/DBSharding.Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/DBSharding.Test/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
--------------------------------------------------------------------------------
/DBSharding.Test/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
--------------------------------------------------------------------------------
/DBSharding.Test/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding.Test/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
--------------------------------------------------------------------------------
/DBSharding.Test/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/DBSharding.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DBSharding", "DBSharding\DBSharding.csproj", "{51E4655E-E2CE-4A02-AFC4-3A9DD4557919}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DBSharding.Test", "DBSharding.Test\DBSharding.Test.csproj", "{36F1D3CA-3400-4B67-9445-F7BF5D575084}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {51E4655E-E2CE-4A02-AFC4-3A9DD4557919}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {51E4655E-E2CE-4A02-AFC4-3A9DD4557919}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {51E4655E-E2CE-4A02-AFC4-3A9DD4557919}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {51E4655E-E2CE-4A02-AFC4-3A9DD4557919}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {36F1D3CA-3400-4B67-9445-F7BF5D575084}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {36F1D3CA-3400-4B67-9445-F7BF5D575084}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {36F1D3CA-3400-4B67-9445-F7BF5D575084}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {36F1D3CA-3400-4B67-9445-F7BF5D575084}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | EnterpriseLibraryConfigurationToolBinariesPathV6 = packages\EnterpriseLibrary.Common.6.0.1304.0\lib\NET45;packages\EnterpriseLibrary.PolicyInjection.6.0.1304.0\lib\NET45;packages\EnterpriseLibrary.ExceptionHandling.6.0.1304.0\lib\NET45
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/DBSharding/Advice.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Reflection;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using DBSharding;
9 | using SheepAspect.Framework;
10 | using SheepAspect.Runtime;
11 |
12 | namespace DBSharding
13 | {
14 | [Aspect]
15 | public class Advice
16 | {
17 | [SelectMethods("HasCustomAttributeType:'DBSharding.ShardingModeAttribute'")]
18 | public void PublicMethods() { }
19 |
20 | [Around("PublicMethods")]
21 | public object LogAroundMethod(MethodJointPoint jp)
22 | {
23 | try
24 | {
25 | ShardingCore.Process(jp.Method,jp.Args);
26 |
27 | var result = jp.Execute();
28 |
29 | if (jp.Method.ReturnType == typeof(void))
30 | result = "{void}";
31 |
32 | return result;
33 | }
34 | catch (Exception e)
35 | {
36 | throw;
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/DBSharding/DBSharding.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {51E4655E-E2CE-4A02-AFC4-3A9DD4557919}
8 | Library
9 | Properties
10 | DBSharding
11 | DBSharding
12 | v4.5.1
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 | ..\packages\SheepAspect.0.3.0.15\Lib\Antlr3.Runtime.dll
35 | True
36 |
37 |
38 | ..\packages\Mono.Cecil.0.9.5.0\lib\net40\Mono.Cecil.dll
39 | True
40 |
41 |
42 | ..\packages\Mono.Cecil.0.9.5.0\lib\net40\Mono.Cecil.Mdb.dll
43 | True
44 |
45 |
46 | ..\packages\Mono.Cecil.0.9.5.0\lib\net40\Mono.Cecil.Pdb.dll
47 | True
48 |
49 |
50 | ..\packages\Mono.Cecil.0.9.5.0\lib\net40\Mono.Cecil.Rocks.dll
51 | True
52 |
53 |
54 | ..\packages\SheepAspect.0.3.0.15\Lib\SheepAspect.dll
55 | True
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
87 |
--------------------------------------------------------------------------------
/DBSharding/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("DBSharding")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DBSharding")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("51e4655e-e2ce-4a02-afc4-3a9dd4557919")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/DBSharding/ShardingConnUtils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading;
7 | using System.Threading.Tasks;
8 |
9 | namespace DBSharding
10 | {
11 | public class ShardingConnUtils
12 | {
13 | private static ThreadLocal local = new ThreadLocal();
14 |
15 | private static Dictionary _connectionDic = null;
16 |
17 | public static IDbConnection GetConnection()
18 | {
19 | IDbConnection conn = _connectionDic[local.Value];
20 | return conn;
21 | }
22 |
23 | public static void SetConnectionIndex(string connectionKey)
24 | {
25 | local.Value = connectionKey;
26 | }
27 |
28 | public static void RegisConnGroup(Dictionary connectionDic)
29 | {
30 | _connectionDic = connectionDic;
31 | }
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/DBSharding/ShardingCore.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Reflection;
5 | using System.Runtime.Remoting.Messaging;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace DBSharding
10 | {
11 | public class ShardingCore
12 | {
13 | public static void Process(MethodInfo methodInfo, object[] args)
14 | {
15 | ShardingModeAttribute shardingMode = methodInfo.GetCustomAttribute();
16 |
17 | if (shardingMode != null)
18 | {
19 | switch (shardingMode.ShardingMode)
20 | {
21 | case ShardingMode.Mod:
22 | int talbeCount = shardingMode.TableCount;
23 | ModShardingProcess(methodInfo, args, talbeCount);
24 | break;
25 | case ShardingMode.Day:
26 | break;
27 | case ShardingMode.Month:
28 | break;
29 | case ShardingMode.Yeae:
30 | break;
31 | }
32 | }
33 | }
34 |
35 | private static void ModShardingProcess(MethodInfo methodInfo, object[] args, int tableCount)
36 | {
37 | ParameterInfo[] paramseteInfos = methodInfo.GetParameters(); //获取方法调用参数
38 |
39 | if (paramseteInfos != null && paramseteInfos.Length > 0)
40 | {
41 | foreach (ParameterInfo parameterInfo in paramseteInfos)
42 | {
43 | ShardingKeyAttribute shardingKeyAttribute = parameterInfo.GetCustomAttribute();
44 | if (shardingKeyAttribute != null)
45 | {
46 | int shardingValue = 0;
47 | if (string.IsNullOrEmpty(shardingKeyAttribute.Keys))
48 | {
49 | object shardingObjectValue = args[parameterInfo.Position];
50 |
51 | shardingValue = Convert.ToInt32(shardingObjectValue);
52 |
53 | }
54 | else
55 | {
56 | string shardingKey = shardingKeyAttribute.Keys;
57 | object targetObject = args[parameterInfo.Position];
58 | object shardingObjectValue = targetObject.GetType().GetProperty(shardingKey).GetValue(targetObject);
59 |
60 | shardingValue = Convert.ToInt32(shardingObjectValue);
61 |
62 | }
63 | int connectionIndex = shardingValue % tableCount;
64 | ShardingConnUtils.SetConnectionIndex(connectionIndex.ToString());
65 | }
66 | }
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/DBSharding/ShardingKeyAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace DBSharding
8 | {
9 | [AttributeUsage(AttributeTargets.Parameter)]
10 | public class ShardingKeyAttribute : Attribute
11 | {
12 | public string Keys { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/DBSharding/ShardingMode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace DBSharding
8 | {
9 | public enum ShardingMode
10 | {
11 | Mod,
12 | Day,
13 | Month,
14 | Yeae
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/DBSharding/ShardingModeAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace DBSharding
8 | {
9 | [AttributeUsage(AttributeTargets.Method)]
10 | public class ShardingModeAttribute : Attribute
11 | {
12 | public ShardingMode ShardingMode { get; set; }
13 |
14 | public int TableCount { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/DBSharding/bin/Debug/Antlr3.Runtime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/bin/Debug/Antlr3.Runtime.dll
--------------------------------------------------------------------------------
/DBSharding/bin/Debug/DBSharding.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/bin/Debug/DBSharding.dll
--------------------------------------------------------------------------------
/DBSharding/bin/Debug/DBSharding.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/bin/Debug/DBSharding.pdb
--------------------------------------------------------------------------------
/DBSharding/bin/Debug/Mono.Cecil.Mdb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/bin/Debug/Mono.Cecil.Mdb.dll
--------------------------------------------------------------------------------
/DBSharding/bin/Debug/Mono.Cecil.Pdb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/bin/Debug/Mono.Cecil.Pdb.dll
--------------------------------------------------------------------------------
/DBSharding/bin/Debug/Mono.Cecil.Rocks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/bin/Debug/Mono.Cecil.Rocks.dll
--------------------------------------------------------------------------------
/DBSharding/bin/Debug/Mono.Cecil.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/bin/Debug/Mono.Cecil.dll
--------------------------------------------------------------------------------
/DBSharding/bin/Debug/SheepAspect.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/bin/Debug/SheepAspect.dll
--------------------------------------------------------------------------------
/DBSharding/bin/Debug/SheepAspect.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SheepAspect
5 |
6 |
7 |
8 |
9 | Indicate that an aspect class will always be instantiated for every advice execution. Not recommended.
10 |
11 |
12 |
13 |
14 | Indicate that a class is a SheepAspect aspect class. By default, this attribute is the same as .
15 |
16 |
17 |
18 |
19 | Produces a
20 |
21 | Example:
22 |
23 | [SelectPropertyMethods("Getter & Name:'Is*' & InType:Namespace:'Foo.Bar.*")]
24 | public void FooGettersPointcut(){}
25 |
26 |
27 |
28 |
29 |
30 |
31 | Initializes a new instance of this class.
32 |
33 | SAQL for
34 |
35 |
36 |
37 | This advice statically adds attributes to target types, methods, properties, fields, etc.
38 |
39 | Example, to add [Foo(Bar="sheep")] and [Boom("Blah")] attributes into all properties matched by "SomePropertiesPointcut":
40 |
41 | [DeclareAttributes("SomePropertiesPointcut")]
42 | [Foo(Bar="sheep")]
43 | [Boom("Blah")]
44 | public object DummyMeaninglessProperty {get; set;}
45 |
46 |
47 |
48 |
49 |
50 |
51 | Initializes a new instance of this class.
52 | Accepts: , , , , , .
53 |
54 | Names of target pointcuts
55 |
56 |
57 |
58 | Add interface implementations to existing types.
59 | Attaching on a factory method:
60 |
61 | [DeclareMixins("TypePointcutName")]
62 | public <T:interface> FooMethod(<optional T:object> instance)
63 | {
64 | return new InterfaceImplementation();
65 | }
66 |
67 |
68 | Attaching on a field:
69 |
70 | [DeclareMixins("TypePointcutName")]
71 | public <T:interface> FooField;
72 |
73 |
74 |
75 |
76 |
77 |
78 | Initializes a new instance of this class.
79 | Accepts: .
80 |
81 | Names of target s.
82 |
83 |
84 |
85 | Other interface types to be mixed-in into the target type.
86 | Make sure the implementation returned by this advice also implements this interface.
87 |
88 |
89 |
90 |
91 | If set to true, each target instance will only inquire this aspect once to retrieve a mixin implementation.
92 | All subsequent invocations on that instance will be directed to the same mixin implementation reference.
93 | Set to false to inquire this aspect on every invocation.
94 | Default is true on methods, or false on fields.
95 |
96 |
97 |
98 |
99 | Produces a matching type constructors
100 |
101 | Example:
102 |
103 | [SelectConstructors("InType:Namespace:'Foo.Bar.*" & Args:[Implements:Name:'I*Repository', 'System.String'])]
104 | public void FooConstructorsPointcut(){}
105 |
106 |
107 |
108 |
109 |
110 |
111 | Initializes a new instance of this class.
112 |
113 | SAQL expression for
114 |
115 |
116 |
117 | Specify type for this aspect class.
118 | Aspect class without this attribute will use the value defined in ...
119 |
120 |
121 |
122 |
123 | Initializes a new class of this class.
124 |
125 | The implementation type of . It must have a public default constructor.
126 |
127 |
128 |
129 | Weavers with lower priority values will get processed earlier during compilation
130 | This is useful to ensure certain weavers only get executed after all others, hence ensuring it will not get overruled by accident
131 |
132 |
133 |
134 |
135 | Indicate that an aspect class will only be instantiated once during the lifetime of the application.
136 |
137 |
138 |
139 |
140 | Indicate that the instance of an aspect class will be associated with the of the jointpoint.
141 |
142 |
143 |
144 |
145 | Optional: name of a pointcut. If specified, the aspect will only be activated (and bound to the This instance) when the selected jointpoints are triggered.
146 | When ommitted, the aspect will be auto-activated on the first instance it's required.
147 | Accepts: , , ,
148 | , , .
149 |
150 |
151 |
152 |
153 | Produces a .
154 |
155 | Example:
156 |
157 | [SelectTypes("Name:'*Service' & Namespace:'Foo.Bar.*")]
158 | public void FooServiceTypesPointcut(){}
159 |
160 |
161 |
162 |
163 |
164 |
165 | Initializes a new instance of this class.
166 |
167 | SAQL for
168 |
169 |
170 |
171 | Initializes a new instance of this class.
172 |
173 | Types to be selected by this
174 |
175 |
176 |
177 | Produces a
178 |
179 | Example:
180 |
181 | [SelectFields("Name:'_is*' & InType:Namespace:'Foo.Bar.*")]
182 | public void FooFieldsPointcut(){}
183 |
184 |
185 |
186 |
187 |
188 |
189 | Initializes a new instance of this class.
190 |
191 | SAQL expression for
192 |
193 |
194 |
195 | Support for @otherPointcut
196 |
197 | The top-level pointcut, in case the reference is invalid and we want the exception to explain the source of the trouble
198 | Aspect that owns the referenced pointcut
199 | Name of the referenced pointcut
200 |
201 |
202 |
203 | Support for @otherPointcut
204 |
205 | The top-level pointcut, in case the reference is invalid and we want the exception to explain the source of the trouble
206 | Aspect that owns the referenced pointcut
207 | Name of the referenced pointcut
208 |
209 |
210 |
211 | Surround the execution of methods, properties, method-calls, field gets/sets instructions, etc.
212 | Usage signature:
213 |
214 | [Around("PointcutName")]
215 | public <void | T:object> FooMethod(<T:IJointPoint> jp) { ... }
216 |
217 |
218 |
219 | Example:
220 |
221 | [Around("FooPointcut")]
222 | public int AroundFooPointcut(MethodJointPoint jointPoint)
223 | {
224 | ....
225 | jointPoint.Execute();
226 | ...
227 | }
228 |
229 |
230 |
231 |
232 |
233 |
234 | Initializes a new instance of this class.
235 | Accepts: , , ,
236 | , , .
237 |
238 | Names of target pointcuts
239 |
240 |
241 |
242 | Advices with lower priority values will be applied first.
243 | Default: 100
244 |
245 |
246 |
247 |
248 | Produces a that maches a code instruction of calling a method.
249 |
250 | Example:
251 |
252 | [SelectCalMethods("Method: (Name:'Execute*' & Type:Name:'*Service')")]
253 | public void ServiceExecuteCallsPointcut(){}
254 |
255 | (The example will match the line emailService.ExecuteSend("Hello World!"); in the code)
256 |
257 |
258 |
259 |
260 |
261 | Initializes new instance of class.
262 |
263 | SAQL expression for
264 |
265 |
266 |
267 | Produces a that maches a code instruction of setting a field.
268 |
269 | Example:
270 |
271 | [SelectSetFields("Field:(Name:'_is*' & InType:Name:'*Service'"))]
272 | public void ServiceFieldSetsPointcut(){}
273 |
274 | (The example will match the line emailService._isActive = true in the code)
275 |
276 |
277 |
278 |
279 |
280 | Initializes new instance of this class.
281 |
282 | SAQL expression for
283 |
284 |
285 |
286 | Produces a that maches a code instruction of getting the value from a field.
287 |
288 | Example:
289 |
290 | [SelectGetFields("Field:(Name:'_is*' & InType:Name:'*Service'"))]
291 | public void ServiceFieldGetsPointcut(){}
292 |
293 | (The example will match the line var isActive = emailService._isActive in the code)
294 |
295 |
296 |
297 |
298 |
299 | Initializes new instance of this class.
300 |
301 | SAQL expression for
302 |
303 |
304 |
305 | Indicate that the instance of an aspect class will live within the span of a particular control flow.
306 | The control flows are defined by the pointcuts passed to the constructor of this attribute.
307 |
308 |
309 |
310 |
311 | Initializes a new class of this class.
312 | Accepts: , , ,
313 | , , .
314 |
315 |
316 | Names of pointcuts that define the control flows that mark the scope of the aspect instance lifetime.
317 |
318 |
319 |
320 |
321 | Produces a
322 |
323 | Example:
324 |
325 | [SelectMethods("Name:'Execute*' & InType:Namespace:'Foo.Bar.*")]
326 | public void FooMethodsPointcut(){}
327 |
328 |
329 |
330 |
331 |
332 |
333 | Initializes a new instance of this class.
334 |
335 | SAQL for
336 |
337 |
338 |
339 | Produces a
340 | To select property's getter and setter methods, see instead
341 |
342 | Example:
343 |
344 | [SelectProperties("Name:'Is*' & InType:Namespace:'Foo.Bar.*")]
345 | public void FooPropertiesPointcut(){}
346 |
347 |
348 |
349 |
350 |
351 |
352 | Initializes a new instance of this class.
353 |
354 | SAQL for
355 |
356 |
357 |
358 |
359 | Indicate that an aspect class will always be instantiated for every advice execution. Not recommended.
360 |
361 |
362 |
363 |
364 | Requires 2 items (object target, object this) in the evaulation stack
365 |
366 | IlProcessor, usually that of the target-method
367 | Args variable for dispatching
368 |
369 |
370 |
371 |
372 | To be appended on the static constructor, initializing static StaticJp field
373 | Already suppied as the first 2 arguments: AdviceInvoker, AdviceCallback
374 |
375 | IL processor of the static constructor
376 |
377 |
378 |
379 | Weavers with lower priority values will get processed earlier during compilation
380 | This is useful to ensure certain weavers only get executed after all others, hence ensuring it will not get overruled by accident
381 | By default: 100
382 |
383 |
384 |
385 |
386 | To be appended on the static constructor, initializing static StaticJp field
387 | Already suppied as the first 2 arguments: AdviceInvoker, AdviceCallback
388 |
389 | IL processor of the static constructor
390 |
391 |
392 |
393 | Weavers with lower priority values will get processed earlier during compilation
394 | This is useful to ensure certain weavers only get executed after all others, hence ensuring it will not get overruled by accident
395 | Priority value of FlowAspectLifecycleWeaver is 900, so it will be executed later than other MethodWeaverBase (by default: 100)
396 |
397 |
398 |
399 |
400 |
--------------------------------------------------------------------------------
/DBSharding/obj/Debug/DBSharding.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | D:\Project\DBSharding\DBSharding\bin\Debug\DBSharding.dll
2 | D:\Project\DBSharding\DBSharding\bin\Debug\DBSharding.pdb
3 | D:\Project\DBSharding\DBSharding\bin\Debug\Antlr3.Runtime.dll
4 | D:\Project\DBSharding\DBSharding\bin\Debug\Mono.Cecil.dll
5 | D:\Project\DBSharding\DBSharding\bin\Debug\Mono.Cecil.Mdb.dll
6 | D:\Project\DBSharding\DBSharding\bin\Debug\Mono.Cecil.Pdb.dll
7 | D:\Project\DBSharding\DBSharding\bin\Debug\Mono.Cecil.Rocks.dll
8 | D:\Project\DBSharding\DBSharding\bin\Debug\SheepAspect.dll
9 | D:\Project\DBSharding\DBSharding\bin\Debug\SheepAspect.xml
10 | D:\Project\DBSharding\DBSharding\obj\Debug\DBSharding.dll
11 | D:\Project\DBSharding\DBSharding\obj\Debug\DBSharding.pdb
12 | D:\Project\DBSharding\DBSharding\obj\Debug\DBSharding.csprojResolveAssemblyReference.cache
13 |
--------------------------------------------------------------------------------
/DBSharding/obj/Debug/DBSharding.csprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/obj/Debug/DBSharding.csprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/DBSharding/obj/Debug/DBSharding.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/obj/Debug/DBSharding.dll
--------------------------------------------------------------------------------
/DBSharding/obj/Debug/DBSharding.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/obj/Debug/DBSharding.pdb
--------------------------------------------------------------------------------
/DBSharding/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/DBSharding/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
--------------------------------------------------------------------------------
/DBSharding/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
--------------------------------------------------------------------------------
/DBSharding/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/DBSharding/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
--------------------------------------------------------------------------------
/DBSharding/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DBSharding
2 | ## http://www.cnblogs.com/beyondbit/p/6391934.html
3 |
--------------------------------------------------------------------------------
/packages/Dapper.1.50.2/Dapper.1.50.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Dapper.1.50.2/Dapper.1.50.2.nupkg
--------------------------------------------------------------------------------
/packages/Dapper.1.50.2/lib/net40/Dapper.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Dapper.1.50.2/lib/net40/Dapper.dll
--------------------------------------------------------------------------------
/packages/Dapper.1.50.2/lib/net40/Dapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Dapper
5 |
6 |
7 |
8 |
9 | Represents the key aspects of a sql operation
10 |
11 |
12 |
13 |
14 | The command (sql or a stored-procedure name) to execute
15 |
16 |
17 |
18 |
19 | The parameters associated with the command
20 |
21 |
22 |
23 |
24 | The active transaction for the command
25 |
26 |
27 |
28 |
29 | The effective timeout for the command
30 |
31 |
32 |
33 |
34 | The type of command that the command-text represents
35 |
36 |
37 |
38 |
39 | Should data be buffered before returning?
40 |
41 |
42 |
43 |
44 | Should the plan for this query be cached?
45 |
46 |
47 |
48 |
49 | Additional state flags against this command
50 |
51 |
52 |
53 |
54 | Can async queries be pipelined?
55 |
56 |
57 |
58 |
59 | Initialize the command definition
60 |
61 |
62 |
63 |
64 | Additional state flags that control command behaviour
65 |
66 |
67 |
68 |
69 | No additional flags
70 |
71 |
72 |
73 |
74 | Should data be buffered before returning?
75 |
76 |
77 |
78 |
79 | Can async queries be pipelined?
80 |
81 |
82 |
83 |
84 | Should the plan cache be bypassed?
85 |
86 |
87 |
88 |
89 | Implements custom property mapping by user provided criteria (usually presence of some custom attribute with column to member mapping)
90 |
91 |
92 |
93 |
94 | Creates custom property mapping
95 |
96 | Target entity type
97 | Property selector based on target type and DataReader column name
98 |
99 |
100 |
101 | Always returns default constructor
102 |
103 | DataReader column names
104 | DataReader column types
105 | Default constructor
106 |
107 |
108 |
109 | Always returns null
110 |
111 |
112 |
113 |
114 |
115 | Not implemented as far as default constructor used for all cases
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 | Returns property based on selector strategy
124 |
125 | DataReader column name
126 | Poperty member map
127 |
128 |
129 |
130 | This class represents a SQL string, it can be used if you need to denote your parameter is a Char vs VarChar vs nVarChar vs nChar
131 |
132 |
133 |
134 |
135 | Default value for IsAnsi.
136 |
137 |
138 |
139 |
140 | A value to set the default value of strings
141 | going through Dapper. Default is 4000, any value larger than this
142 | field will not have the default value applied.
143 |
144 |
145 |
146 |
147 | Create a new DbString
148 |
149 |
150 |
151 |
152 | Ansi vs Unicode
153 |
154 |
155 |
156 |
157 | Fixed length
158 |
159 |
160 |
161 |
162 | Length of the string -1 for max
163 |
164 |
165 |
166 |
167 | The value of the string
168 |
169 |
170 |
171 |
172 | Add the parameter to the command... internal use only
173 |
174 |
175 |
176 |
177 |
178 |
179 | Represents default type mapping strategy used by Dapper
180 |
181 |
182 |
183 |
184 | Creates default type map
185 |
186 | Entity type
187 |
188 |
189 |
190 | Finds best constructor
191 |
192 | DataReader column names
193 | DataReader column types
194 | Matching constructor or default one
195 |
196 |
197 |
198 | Returns the constructor, if any, that has the ExplicitConstructorAttribute on it.
199 |
200 |
201 |
202 |
203 | Gets mapping for constructor parameter
204 |
205 | Constructor to resolve
206 | DataReader column name
207 | Mapping implementation
208 |
209 |
210 |
211 | Gets member mapping for column
212 |
213 | DataReader column name
214 | Mapping implementation
215 |
216 |
217 |
218 | Should column names like User_Id be allowed to match properties/fields like UserId ?
219 |
220 |
221 |
222 |
223 | The settable properties for this typemap
224 |
225 |
226 |
227 |
228 | A bag of parameters that can be passed to the Dapper Query and Execute methods
229 |
230 |
231 |
232 |
233 | construct a dynamic parameter bag
234 |
235 |
236 |
237 |
238 | construct a dynamic parameter bag
239 |
240 | can be an anonymous type or a DynamicParameters bag
241 |
242 |
243 |
244 | Append a whole object full of params to the dynamic
245 | EG: AddDynamicParams(new {A = 1, B = 2}) // will add property A and B to the dynamic
246 |
247 |
248 |
249 |
250 |
251 | Add a parameter to this dynamic parameter list
252 |
253 |
254 |
255 |
256 | Add a parameter to this dynamic parameter list
257 |
258 |
259 |
260 |
261 | If true, the command-text is inspected and only values that are clearly used are included on the connection
262 |
263 |
264 |
265 |
266 | Add all the parameters needed to the command just before it executes
267 |
268 | The raw command prior to execution
269 | Information about the query
270 |
271 |
272 |
273 | All the names of the param in the bag, use Get to yank them out
274 |
275 |
276 |
277 |
278 | Get the value of a parameter
279 |
280 |
281 |
282 | The value, note DBNull.Value is not returned, instead the value is returned as null
283 |
284 |
285 |
286 | Allows you to automatically populate a target property/field from output parameters. It actually
287 | creates an InputOutput parameter, so you can still pass data in.
288 |
289 |
290 | The object whose property/field you wish to populate.
291 | A MemberExpression targeting a property/field of the target (or descendant thereof.)
292 |
293 | The size to set on the parameter. Defaults to 0, or DbString.DefaultLength in case of strings.
294 | The DynamicParameters instance
295 |
296 |
297 |
298 | Tell Dapper to use an explicit constructor, passing nulls or 0s for all parameters
299 |
300 |
301 |
302 |
303 | Handles variances in features per DBMS
304 |
305 |
306 |
307 |
308 | Gets the feature set based on the passed connection
309 |
310 |
311 |
312 |
313 | True if the db supports array columns e.g. Postgresql
314 |
315 |
316 |
317 |
318 | Represents simple member map for one of target parameter or property or field to source DataReader column
319 |
320 |
321 |
322 |
323 | Creates instance for simple property mapping
324 |
325 | DataReader column name
326 | Target property
327 |
328 |
329 |
330 | Creates instance for simple field mapping
331 |
332 | DataReader column name
333 | Target property
334 |
335 |
336 |
337 | Creates instance for simple constructor parameter mapping
338 |
339 | DataReader column name
340 | Target constructor parameter
341 |
342 |
343 |
344 | DataReader column name
345 |
346 |
347 |
348 |
349 | Target member type
350 |
351 |
352 |
353 |
354 | Target property
355 |
356 |
357 |
358 |
359 | Target field
360 |
361 |
362 |
363 |
364 | Target constructor parameter
365 |
366 |
367 |
368 |
369 | Used to pass a IEnumerable<SqlDataRecord> as a SqlDataRecordListTVPParameter
370 |
371 |
372 |
373 |
374 | Create a new instance of SqlDataRecordListTVPParameter
375 |
376 |
377 |
378 |
379 | Dapper, a light weight object mapper for ADO.NET
380 |
381 |
382 |
383 |
384 | Called if the query cache is purged via PurgeQueryCache
385 |
386 |
387 |
388 |
389 | Purge the query cache
390 |
391 |
392 |
393 |
394 | Return a count of all the cached queries by dapper
395 |
396 |
397 |
398 |
399 |
400 | Return a list of all the queries cached by dapper
401 |
402 |
403 |
404 |
405 |
406 |
407 | Deep diagnostics only: find any hash collisions in the cache
408 |
409 |
410 |
411 |
412 |
413 | Clear the registered type handlers
414 |
415 |
416 |
417 |
418 | Configure the specified type to be mapped to a given db-type
419 |
420 |
421 |
422 |
423 | Configure the specified type to be processed by a custom handler
424 |
425 |
426 |
427 |
428 | Configure the specified type to be processed by a custom handler
429 |
430 |
431 |
432 |
433 | Configure the specified type to be processed by a custom handler
434 |
435 |
436 |
437 |
438 | Get the DbType that maps to a given value
439 |
440 |
441 |
442 |
443 | OBSOLETE: For internal usage only. Lookup the DbType and handler for a given Type and member
444 |
445 |
446 |
447 |
448 | Obtains the data as a list; if it is *already* a list, the original object is returned without
449 | any duplication; otherwise, ToList() is invoked.
450 |
451 |
452 |
453 |
454 | Execute parameterized SQL
455 |
456 | Number of rows affected
457 |
458 |
459 |
460 | Execute parameterized SQL
461 |
462 | Number of rows affected
463 |
464 |
465 |
466 | Execute parameterized SQL that selects a single value
467 |
468 | The first cell selected
469 |
470 |
471 |
472 | Execute parameterized SQL that selects a single value
473 |
474 | The first cell selected
475 |
476 |
477 |
478 | Execute parameterized SQL that selects a single value
479 |
480 | The first cell selected
481 |
482 |
483 |
484 | Execute parameterized SQL that selects a single value
485 |
486 | The first cell selected
487 |
488 |
489 |
490 | Execute parameterized SQL and return an
491 |
492 | An that can be used to iterate over the results of the SQL query.
493 |
494 | This is typically used when the results of a query are not processed by Dapper, for example, used to fill a
495 | or .
496 |
497 |
498 |
499 |
506 |
507 |
508 |
509 |
510 |
511 | Execute parameterized SQL and return an
512 |
513 | An that can be used to iterate over the results of the SQL query.
514 |
515 | This is typically used when the results of a query are not processed by Dapper, for example, used to fill a
516 | or .
517 |
518 |
519 |
520 |
521 | Execute parameterized SQL and return an
522 |
523 | An that can be used to iterate over the results of the SQL query.
524 |
525 | This is typically used when the results of a query are not processed by Dapper, for example, used to fill a
526 | or .
527 |
528 |
529 |
530 |
531 | Return a sequence of dynamic objects with properties matching the columns
532 |
533 | Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object>
534 |
535 |
536 |
537 | Return a dynamic object with properties matching the columns
538 |
539 | Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object>
540 |
541 |
542 |
543 | Return a dynamic object with properties matching the columns
544 |
545 | Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object>
546 |
547 |
548 |
549 | Return a dynamic object with properties matching the columns
550 |
551 | Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object>
552 |
553 |
554 |
555 | Return a dynamic object with properties matching the columns
556 |
557 | Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object>
558 |
559 |
560 |
561 | Executes a query, returning the data typed as per T
562 |
563 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
564 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
565 |
566 |
567 |
568 |
569 | Executes a single-row query, returning the data typed as per T
570 |
571 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
572 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
573 |
574 |
575 |
576 |
577 | Executes a single-row query, returning the data typed as per T
578 |
579 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
580 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
581 |
582 |
583 |
584 |
585 | Executes a single-row query, returning the data typed as per T
586 |
587 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
588 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
589 |
590 |
591 |
592 |
593 | Executes a single-row query, returning the data typed as per T
594 |
595 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
596 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
597 |
598 |
599 |
600 |
601 | Executes a single-row query, returning the data typed as per the Type suggested
602 |
603 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
604 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
605 |
606 |
607 |
608 |
609 | Executes a single-row query, returning the data typed as per the Type suggested
610 |
611 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
612 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
613 |
614 |
615 |
616 |
617 | Executes a single-row query, returning the data typed as per the Type suggested
618 |
619 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
620 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
621 |
622 |
623 |
624 |
625 | Executes a single-row query, returning the data typed as per the Type suggested
626 |
627 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
628 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
629 |
630 |
631 |
632 |
633 | Executes a single-row query, returning the data typed as per the Type suggested
634 |
635 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
636 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
637 |
638 |
639 |
640 |
641 | Executes a query, returning the data typed as per T
642 |
643 | the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object
644 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
645 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
646 |
647 |
648 |
649 |
650 | Executes a query, returning the data typed as per T
651 |
652 | the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object
653 | A single instance or null of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
654 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
655 |
656 |
657 |
658 |
659 | Executes a query, returning the data typed as per T
660 |
661 | the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object
662 | A single or null instance of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
663 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
664 |
665 |
666 |
667 |
668 | Executes a query, returning the data typed as per T
669 |
670 | the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object
671 | A single instance of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
672 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
673 |
674 |
675 |
676 |
677 | Executes a query, returning the data typed as per T
678 |
679 | the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object
680 | A single instance of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
681 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
682 |
683 |
684 |
685 |
686 | Execute a command that returns multiple result sets, and access each in turn
687 |
688 |
689 |
690 |
691 | Execute a command that returns multiple result sets, and access each in turn
692 |
693 |
694 |
695 |
696 | Maps a query to objects
697 |
698 | The first type in the record set
699 | The second type in the record set
700 | The return type
701 |
702 |
703 |
704 |
705 |
706 |
707 | The Field we should split and read the second object from (default: id)
708 | Number of seconds before command execution timeout
709 | Is it a stored proc or a batch?
710 |
711 |
712 |
713 |
714 | Maps a query to objects
715 |
716 |
717 |
718 |
719 |
720 |
721 |
722 |
723 |
724 |
725 |
726 | The Field we should split and read the second object from (default: id)
727 | Number of seconds before command execution timeout
728 |
729 |
730 |
731 |
732 |
733 | Perform a multi mapping query with 4 input parameters
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 |
743 |
744 |
745 |
746 |
747 |
748 |
749 |
750 |
751 |
752 |
753 | Perform a multi mapping query with 5 input parameters
754 |
755 |
756 |
757 |
758 |
759 |
760 |
761 |
762 |
763 |
764 |
765 |
766 |
767 |
768 |
769 |
770 |
771 |
772 |
773 |
774 | Perform a multi mapping query with 6 input parameters
775 |
776 |
777 |
778 |
779 |
780 |
781 |
782 |
783 |
784 |
785 |
786 |
787 |
788 |
789 |
790 |
791 |
792 |
793 |
794 |
795 |
796 | Perform a multi mapping query with 7 input parameters
797 |
798 |
799 |
800 |
801 |
802 |
803 |
804 |
805 |
806 |
807 |
808 |
809 |
810 |
811 |
812 |
813 |
814 |
815 |
816 |
817 |
818 |
819 | Perform a multi mapping query with arbitrary input parameters
820 |
821 | The return type
822 |
823 |
824 | array of types in the record set
825 |
826 |
827 |
828 |
829 | The Field we should split and read the second object from (default: id)
830 | Number of seconds before command execution timeout
831 | Is it a stored proc or a batch?
832 |
833 |
834 |
835 |
836 | Internal use only
837 |
838 |
839 |
840 |
841 |
842 |
843 | Internal use only
844 |
845 |
846 |
847 |
848 | Internal use only
849 |
850 |
851 |
852 |
853 | Internal use only
854 |
855 |
856 |
857 |
858 | OBSOLETE: For internal usage only. Sanitizes the paramter value with proper type casting.
859 |
860 |
861 |
862 |
863 | Replace all literal tokens with their text form
864 |
865 |
866 |
867 |
868 | Convert numeric values to their string form for SQL literal purposes
869 |
870 |
871 |
872 |
873 | Internal use only
874 |
875 |
876 |
877 |
878 | Gets type-map for the given type
879 |
880 | Type map instance, default is to create new instance of DefaultTypeMap
881 |
882 |
883 |
884 | Gets type-map for the given type
885 |
886 | Type map implementation, DefaultTypeMap instance if no override present
887 |
888 |
889 |
890 | Set custom mapping for type deserializers
891 |
892 | Entity type to override
893 | Mapping rules impementation, null to remove custom map
894 |
895 |
896 |
897 | Internal use only
898 |
899 |
900 |
901 |
902 |
903 |
904 |
905 |
906 |
907 |
908 | Throws a data exception, only used internally
909 |
910 |
911 |
912 |
913 | How should connection strings be compared for equivalence? Defaults to StringComparer.Ordinal.
914 | Providing a custom implementation can be useful for allowing multi-tenancy databases with identical
915 | schema to share strategies. Note that usual equivalence rules apply: any equivalent connection strings
916 | MUST yield the same hash-code.
917 |
918 |
919 |
920 |
921 | Key used to indicate the type name associated with a DataTable
922 |
923 |
924 |
925 |
926 | Used to pass a DataTable as a TableValuedParameter
927 |
928 |
929 |
930 |
931 | Associate a DataTable with a type name
932 |
933 |
934 |
935 |
936 | Fetch the type name associated with a DataTable
937 |
938 |
939 |
940 |
941 | Used to pass a IEnumerable<SqlDataRecord> as a TableValuedParameter
942 |
943 |
944 |
945 |
946 | Dummy type for excluding from multi-map
947 |
948 |
949 |
950 |
951 | The grid reader provides interfaces for reading multiple result sets from a Dapper query
952 |
953 |
954 |
955 |
956 | Read the next grid of results, returned as a dynamic object
957 |
958 | Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object>
959 |
960 |
961 |
962 | Read an individual row of the next grid of results, returned as a dynamic object
963 |
964 | Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object>
965 |
966 |
967 |
968 | Read an individual row of the next grid of results, returned as a dynamic object
969 |
970 | Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object>
971 |
972 |
973 |
974 | Read an individual row of the next grid of results, returned as a dynamic object
975 |
976 | Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object>
977 |
978 |
979 |
980 | Read an individual row of the next grid of results, returned as a dynamic object
981 |
982 | Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object>
983 |
984 |
985 |
986 | Read the next grid of results
987 |
988 |
989 |
990 |
991 | Read an individual row of the next grid of results
992 |
993 |
994 |
995 |
996 | Read an individual row of the next grid of results
997 |
998 |
999 |
1000 |
1001 | Read an individual row of the next grid of results
1002 |
1003 |
1004 |
1005 |
1006 | Read an individual row of the next grid of results
1007 |
1008 |
1009 |
1010 |
1011 | Read the next grid of results
1012 |
1013 |
1014 |
1015 |
1016 | Read an individual row of the next grid of results
1017 |
1018 |
1019 |
1020 |
1021 | Read an individual row of the next grid of results
1022 |
1023 |
1024 |
1025 |
1026 | Read an individual row of the next grid of results
1027 |
1028 |
1029 |
1030 |
1031 | Read an individual row of the next grid of results
1032 |
1033 |
1034 |
1035 |
1036 | Read multiple objects from a single record set on the grid
1037 |
1038 |
1039 |
1040 |
1041 | Read multiple objects from a single record set on the grid
1042 |
1043 |
1044 |
1045 |
1046 | Read multiple objects from a single record set on the grid
1047 |
1048 |
1049 |
1050 |
1051 | Read multiple objects from a single record set on the grid
1052 |
1053 |
1054 |
1055 |
1056 | Read multiple objects from a single record set on the grid
1057 |
1058 |
1059 |
1060 |
1061 | Read multiple objects from a single record set on the grid
1062 |
1063 |
1064 |
1065 |
1066 | Read multiple objects from a single record set on the grid
1067 |
1068 |
1069 |
1070 |
1071 | Has the underlying reader been consumed?
1072 |
1073 |
1074 |
1075 |
1076 | The command associated with the reader
1077 |
1078 |
1079 |
1080 |
1081 | Dispose the grid, closing and disposing both the underlying reader and command.
1082 |
1083 |
1084 |
1085 |
1086 | Implement this interface to pass an arbitrary db specific parameter to Dapper
1087 |
1088 |
1089 |
1090 |
1091 | Add the parameter needed to the command before it executes
1092 |
1093 | The raw command prior to execution
1094 | Parameter name
1095 |
1096 |
1097 |
1098 | Parses a data reader to a sequence of data of the supplied type. Used for deserializing a reader without a connection, etc.
1099 |
1100 |
1101 |
1102 |
1103 | Parses a data reader to a sequence of data of the supplied type (as object). Used for deserializing a reader without a connection, etc.
1104 |
1105 |
1106 |
1107 |
1108 | Parses a data reader to a sequence of dynamic. Used for deserializing a reader without a connection, etc.
1109 |
1110 |
1111 |
1112 |
1113 | Gets the row parser for a specific row on a data reader. This allows for type switching every row based on, for example, a TypeId column.
1114 | You could return a collection of the base type but have each more specific.
1115 |
1116 | The data reader to get the parser for the current row from
1117 | The type to get the parser for
1118 | The start column index of the object (default 0)
1119 | The length of columns to read (default -1 = all fields following startIndex)
1120 | Return null if we can't find the first column? (default false)
1121 | A parser for this specific object from this row.
1122 |
1123 |
1124 |
1125 | Gets the row parser for a specific row on a data reader. This allows for type switching every row based on, for example, a TypeId column.
1126 | You could return a collection of the base type but have each more specific.
1127 |
1128 | The data reader to get the parser for the current row from
1129 | The type to get the parser for
1130 | The start column index of the object (default 0)
1131 | The length of columns to read (default -1 = all fields following startIndex)
1132 | Return null if we can't find the first column? (default false)
1133 | A parser for this specific object from this row.
1134 |
1135 | var result = new List<BaseType>();
1136 | using (var reader = connection.ExecuteReader(@"
1137 | select 'abc' as Name, 1 as Type, 3.0 as Value
1138 | union all
1139 | select 'def' as Name, 2 as Type, 4.0 as Value"))
1140 | {
1141 | if (reader.Read())
1142 | {
1143 | var toFoo = reader.GetRowParser<BaseType>(typeof(Foo));
1144 | var toBar = reader.GetRowParser<BaseType>(typeof(Bar));
1145 | var col = reader.GetOrdinal("Type");
1146 | do
1147 | {
1148 | switch (reader.GetInt32(col))
1149 | {
1150 | case 1:
1151 | result.Add(toFoo(reader));
1152 | break;
1153 | case 2:
1154 | result.Add(toBar(reader));
1155 | break;
1156 | }
1157 | } while (reader.Read());
1158 | }
1159 | }
1160 |
1161 | abstract class BaseType
1162 | {
1163 | public abstract int Type { get; }
1164 | }
1165 | class Foo : BaseType
1166 | {
1167 | public string Name { get; set; }
1168 | public override int Type => 1;
1169 | }
1170 | class Bar : BaseType
1171 | {
1172 | public float Value { get; set; }
1173 | public override int Type => 2;
1174 | }
1175 |
1176 |
1177 |
1178 |
1179 | Identity of a cached query in Dapper, used for extensibility
1180 |
1181 |
1182 |
1183 |
1184 | Create an identity for use with DynamicParameters, internal use only
1185 |
1186 |
1187 |
1188 |
1189 |
1190 |
1191 |
1192 |
1193 |
1194 |
1195 |
1196 |
1197 |
1198 | The sql
1199 |
1200 |
1201 |
1202 |
1203 | The command type
1204 |
1205 |
1206 |
1207 |
1208 |
1209 |
1210 |
1211 |
1212 |
1213 |
1214 |
1215 |
1216 |
1217 |
1218 |
1219 |
1220 |
1221 |
1222 |
1223 |
1224 |
1225 |
1226 |
1227 |
1228 |
1229 |
1230 |
1231 |
1232 |
1233 |
1234 |
1235 |
1236 |
1237 |
1238 |
1239 | Compare 2 Identity objects
1240 |
1241 |
1242 |
1243 |
1244 |
1245 |
1246 | Implement this interface to pass an arbitrary db specific set of parameters to Dapper
1247 |
1248 |
1249 |
1250 |
1251 | Add all the parameters needed to the command just before it executes
1252 |
1253 | The raw command prior to execution
1254 | Information about the query
1255 |
1256 |
1257 |
1258 | Implements this interface to provide custom member mapping
1259 |
1260 |
1261 |
1262 |
1263 | Source DataReader column name
1264 |
1265 |
1266 |
1267 |
1268 | Target member type
1269 |
1270 |
1271 |
1272 |
1273 | Target property
1274 |
1275 |
1276 |
1277 |
1278 | Target field
1279 |
1280 |
1281 |
1282 |
1283 | Target constructor parameter
1284 |
1285 |
1286 |
1287 |
1288 | Extends IDynamicParameters with facilities for executing callbacks after commands have completed
1289 |
1290 |
1291 |
1292 |
1293 | Invoked when the command has executed
1294 |
1295 |
1296 |
1297 |
1298 | Extends IDynamicParameters providing by-name lookup of parameter values
1299 |
1300 |
1301 |
1302 |
1303 | Get the value of the specified parameter (return null if not found)
1304 |
1305 |
1306 |
1307 |
1308 | Implement this interface to perform custom type-based parameter handling and value parsing
1309 |
1310 |
1311 |
1312 |
1313 | Assign the value of a parameter before a command executes
1314 |
1315 | The parameter to configure
1316 | Parameter value
1317 |
1318 |
1319 |
1320 | Parse a database value back to a typed value
1321 |
1322 | The value from the database
1323 | The type to parse to
1324 | The typed value
1325 |
1326 |
1327 |
1328 | Implement this interface to change default mapping of reader columns to type members
1329 |
1330 |
1331 |
1332 |
1333 | Finds best constructor
1334 |
1335 | DataReader column names
1336 | DataReader column types
1337 | Matching constructor or default one
1338 |
1339 |
1340 |
1341 | Returns a constructor which should *always* be used.
1342 |
1343 | Parameters will be default values, nulls for reference types and zero'd for value types.
1344 |
1345 | Use this class to force object creation away from parameterless constructors you don't control.
1346 |
1347 |
1348 |
1349 |
1350 | Gets mapping for constructor parameter
1351 |
1352 | Constructor to resolve
1353 | DataReader column name
1354 | Mapping implementation
1355 |
1356 |
1357 |
1358 | Gets member mapping for column
1359 |
1360 | DataReader column name
1361 | Mapping implementation
1362 |
1363 |
1364 |
1365 | This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example),
1366 | and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE**
1367 | equality. The type is fully thread-safe.
1368 |
1369 |
1370 |
1371 |
1372 | Represents a placeholder for a value that should be replaced as a literal value in the resulting sql
1373 |
1374 |
1375 |
1376 |
1377 | The text in the original command that should be replaced
1378 |
1379 |
1380 |
1381 |
1382 | The name of the member referred to by the token
1383 |
1384 |
1385 |
1386 |
1387 | Permits specifying certain SqlMapper values globally.
1388 |
1389 |
1390 |
1391 |
1392 | Resets all Settings to their default values
1393 |
1394 |
1395 |
1396 |
1397 | Specifies the default Command Timeout for all Queries
1398 |
1399 |
1400 |
1401 |
1402 | Indicates whether nulls in data are silently ignored (default) vs actively applied and assigned to members
1403 |
1404 |
1405 |
1406 |
1407 | Should list expansions be padded with null-valued parameters, to prevent query-plan saturation? For example,
1408 | an 'in @foo' expansion with 7, 8 or 9 values will be sent as a list of 10 values, with 3, 2 or 1 of them null.
1409 | The padding size is relative to the size of the list; "next 10" under 150, "next 50" under 500,
1410 | "next 100" under 1500, etc.
1411 |
1412 |
1413 | Caution: this should be treated with care if your DB provider (or the specific configuration) allows for null
1414 | equality (aka "ansi nulls off"), as this may change the intent of your query; as such, this is disabled by
1415 | default and must be enabled.
1416 |
1417 |
1418 |
1419 |
1420 | If set (non-negative), when performing in-list expansions of integer types ("where id in @ids", etc), switch to a string_split based
1421 | operation if there are more than this many elements. Note that this feautre requires SQL Server 2016 / compatibility level 130 (or above).
1422 |
1423 |
1424 |
1425 |
1426 | Base-class for simple type-handlers
1427 |
1428 |
1429 |
1430 |
1431 | Assign the value of a parameter before a command executes
1432 |
1433 | The parameter to configure
1434 | Parameter value
1435 |
1436 |
1437 |
1438 | Parse a database value back to a typed value
1439 |
1440 | The value from the database
1441 | The typed value
1442 |
1443 |
1444 |
1445 | Base-class for simple type-handlers that are based around strings
1446 |
1447 |
1448 |
1449 |
1450 | Parse a string into the expected type (the string will never be null)
1451 |
1452 |
1453 |
1454 |
1455 | Format an instace into a string (the instance will never be null)
1456 |
1457 |
1458 |
1459 |
1460 | Assign the value of a parameter before a command executes
1461 |
1462 | The parameter to configure
1463 | Parameter value
1464 |
1465 |
1466 |
1467 | Parse a database value back to a typed value
1468 |
1469 | The value from the database
1470 | The typed value
1471 |
1472 |
1473 |
1474 | Not intended for direct usage
1475 |
1476 |
1477 |
1478 |
1479 | Not intended for direct usage
1480 |
1481 |
1482 |
1483 |
1484 | Not intended for direct usage
1485 |
1486 |
1487 |
1488 |
1489 | A type handler for data-types that are supported by the underlying provider, but which need
1490 | a well-known UdtTypeName to be specified
1491 |
1492 |
1493 |
1494 |
1495 | Creates a new instance of UdtTypeHandler with the specified UdtTypeName
1496 |
1497 |
1498 |
1499 |
1500 | Used to pass a DataTable as a TableValuedParameter
1501 |
1502 |
1503 |
1504 |
1505 | Create a new instance of TableValuedParameter
1506 |
1507 |
1508 |
1509 |
1510 | Create a new instance of TableValuedParameter
1511 |
1512 |
1513 |
1514 |
1515 | Describes a reader that controls the lifetime of both a command and a reader,
1516 | exposing the downstream command/reader as properties.
1517 |
1518 |
1519 |
1520 |
1521 | Obtain the underlying reader
1522 |
1523 |
1524 |
1525 |
1526 | Obtain the underlying command
1527 |
1528 |
1529 |
1530 |
1531 |
--------------------------------------------------------------------------------
/packages/Dapper.1.50.2/lib/net45/Dapper.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Dapper.1.50.2/lib/net45/Dapper.dll
--------------------------------------------------------------------------------
/packages/Dapper.1.50.2/lib/net451/Dapper.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Dapper.1.50.2/lib/net451/Dapper.dll
--------------------------------------------------------------------------------
/packages/Dapper.1.50.2/lib/netstandard1.3/Dapper.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Dapper.1.50.2/lib/netstandard1.3/Dapper.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/Mono.Cecil.0.9.5.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/Mono.Cecil.0.9.5.0.nupkg
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/net20/Mono.Cecil.Mdb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/net20/Mono.Cecil.Mdb.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/net20/Mono.Cecil.Pdb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/net20/Mono.Cecil.Pdb.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/net20/Mono.Cecil.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/net20/Mono.Cecil.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/net35/Mono.Cecil.Mdb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/net35/Mono.Cecil.Mdb.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/net35/Mono.Cecil.Pdb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/net35/Mono.Cecil.Pdb.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/net35/Mono.Cecil.Rocks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/net35/Mono.Cecil.Rocks.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/net35/Mono.Cecil.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/net35/Mono.Cecil.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/net40/Mono.Cecil.Mdb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/net40/Mono.Cecil.Mdb.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/net40/Mono.Cecil.Pdb.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/net40/Mono.Cecil.Pdb.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/net40/Mono.Cecil.Rocks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/net40/Mono.Cecil.Rocks.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/net40/Mono.Cecil.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/net40/Mono.Cecil.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/sl40/Mono.Cecil.Rocks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/sl40/Mono.Cecil.Rocks.dll
--------------------------------------------------------------------------------
/packages/Mono.Cecil.0.9.5.0/lib/sl40/Mono.Cecil.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/Mono.Cecil.0.9.5.0/lib/sl40/Mono.Cecil.dll
--------------------------------------------------------------------------------
/packages/MySql.Data.6.9.9/CHANGES:
--------------------------------------------------------------------------------
1 | 6.9.9
2 | - Fix for Nested transactions are not supported in Entity Framework (MySQL Bug #71502, Oracle Bug #22366266).
3 | - Fix for EF5 and EF6 wrong SQL statement to set primary key (MySQL Bug 76292, Oracle Bug #20711384)
4 | - Fixed problem where mysql.proc tables would not be used for metadata even though access was available (MySQL Bug #74116, Oracle Bug #20960373)
5 | - Added support for TLSv1.1 and TLSv1.2
6 | - Fixed Fix for "Aborted connection" (MySQL Bug #80997, Oracle Bug # 23346197).
7 |
8 |
9 | 6.9.8
10 | - Added support for Chinese character set gb18030. (Oracle bug # 21098546).
11 | - Added support for Json type. (WL # 8132).
12 | - Added changes for metadata information in generated columns with 5.7 (WL #411)
13 |
14 | 6.9.7
15 | - Changed default SSL mode to Preferred in connection string. Now the server connections will be using SSL if server allows it by default but it's possible to override this configuration.
16 | - Changed handshake process to use bytes instead of encoded strings.
17 | - Fix for Fabric connections (Oracle Bug #20983968).
18 | - Fix for Fabric plugin: fabric server selection is broken when master is faulty (Oracle Bug #21203824).
19 |
20 |
21 | 6.9.6
22 | - Fix for Incorrect query result with Entity Framework 6 (MySql bug #74918, Oracle bug #20129927).
23 | - Fix for GetTimeZoneOffset to use date and time to calculate timediff (MySQL Bug #74905, Oracle Bug #20065691).
24 | - Fix for MySqlSimpleMembershipProvider keeps database connections open on some operations (MySQL Bug #74662, Oracle Bug #20109419)
25 | - Fix for Any Call to RoleExists() returns true whether or not the role exists (MySql bug #75397, Oracle bug #20325391).
26 | - Fix for all dateTimes set as UTC Kind (MySQL Bug #74134, Oracle Bug #20200662).
27 | - Fix for Invalid SQL query when eager loading two nested collections (MySQL Bug #70941, Oracle bug #18049862).
28 | - Fix for chinese characters used in the connection string when connecting to MySql Server (MySQL Bug #70041, Oracle Bug #18141356).
29 |
30 |
31 |
32 | 6.9.5
33 | - Disabled installation on-demand in Installer (Oracle Bug #19670596).
34 | - Fix for Generated SQL requests column that doesn't exist in LINQ to Entities (MySql bug #72004, Oracle bug #19681348).
35 | - Fix for MySQL Connector/NET generates incorrect SQL for LINQ 'StartsWith' queries (MySql bug #72058, Oracle bug #19680236).
36 | - Fix for Exception when using IEnumerable.Contains(model.property) in Where predicate (MySql bug #73643, Oracle bug #19690370).
37 | - Fix for Generated Sql does not contain ORDER BY statement whose is requested by LINQ (MySql bug #73549, Oracle bug #19698010).
38 | - Fix for Web providers registration in machine.config (removed v20 suffix) (MySQL Bug #74080, Oracle Bug #19715398)
39 | - Fix for Error of "Every derived table must have an alias" in LINQ to Entities when using EF6 + DbFirst + View + Take
40 | (MySql Bug #72148, Oracle bug #19356006).
41 | - Fix for 'the method or operation is not implemented' when using linq with orderby (MySQL Bug #70722, Oracle Bug #19681723).
42 | - Fix for Exception "The given key was not present in the dictionary" when using utf16le charset in a query. (MySql #72737, Oracle Bug #19355906)
43 | - Fix for Memory leak in a loop opening a connection to the database and executing a command (MySql Bug #73122, Oracle Bug #19467233).
44 | - Fix for Multiple issues caused by trailing and leading white space character in params using MySql Membership Provider (MySql Bug #73411, Oracle Bug #19453313)
45 | - Fix for bad assumption leads to modify query adding CALL statement to the beginning of the sql query even when CommandType.Text is specified (MySql Bug #72736, Oracle Bug #19325120).
46 |
47 |
48 | 6.9.4
49 | - Added a new plugin for MySql Fabric 1.5 support
50 |
51 |
52 | 6.9.3
53 | - Fix for Web Parts Personalization provider
54 | - Fix for changing the PK between two int columns (MySql Bug #71418, Oracle bug #18923294).
55 | - Fix for Error when Calling MySqlConnection.GetSchema("PROCEDURES WITH PARAMETERS", ...) (Oracle bug #19285959).
56 | - Fix for EF provider reports ManifestProviderToken = 5.6 for server 5.7 (Oracle bug #19453814).
57 | - Fix for Fluent API DbModelBuilder.HasColumnType is ignored in EF6 (Oracle bug #19456229).
58 | - Fix for Setting a PK GUID identity in Code First in EF6 no longer works in Server 5.7 (Oracle bug #19456452).
59 | - Non PKs declared as Identity GUID have no GUID autogenerated (Oracle bug #19456415).
60 |
61 |
62 | 6.9.2
63 | - Add async/await compatible methods
64 | - Fix for Unable to read geometry column when it has been set with a SRID value. (MySql Bug #71869, Oracle Bug #19137999)
65 | - Fix for Exception adding a new column to an existing model as identity and PK fails when applying the migration (MySql Bug #71418, Oracle bug #18923294).
66 | - Added SiteMap and Personalization configuration web providers to MySql.Web Nuget Package.
67 |
68 |
69 | 6.9.1
70 | - Fix for Exception of "duplicate entry" in MySqlSessionProvider (MySql Bug #70409, Oracle bug #18657550).
71 |
72 |
73 | 6.9.0
74 | - Added implementation of MySQLPersonalizationProvider.
75 | - Added SiteMap Web provider.
76 | - Added Simple Membership Web Provider.
77 | - Fix for open sockets connections left when connection open fails, the error happens when the client try to get a connection when the max number of connections is reached in the server. (MySql #72025, Oracle Bug #18665388).
78 |
--------------------------------------------------------------------------------
/packages/MySql.Data.6.9.9/MySql.Data.6.9.9.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/MySql.Data.6.9.9/MySql.Data.6.9.9.nupkg
--------------------------------------------------------------------------------
/packages/MySql.Data.6.9.9/Readme.txt:
--------------------------------------------------------------------------------
1 | Connector/Net 6.9 Release Notes
2 | ------------------------------------
3 |
4 | Welcome to the release notes for Connector/Net 6.9
5 |
6 | What's new in 6.9
7 | --------------------
8 |
9 | - Simple Membership Web Provider
10 | - Site Map Web Provider
11 | - Personalization Web Provider
12 | - MySql Fabric support
13 |
14 |
15 | Be sure and check the documentation for more information on these new features.
--------------------------------------------------------------------------------
/packages/MySql.Data.6.9.9/content/app.config.transform:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/packages/MySql.Data.6.9.9/content/web.config.transform:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/packages/MySql.Data.6.9.9/lib/net40/MySql.Data.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/MySql.Data.6.9.9/lib/net40/MySql.Data.dll
--------------------------------------------------------------------------------
/packages/MySql.Data.6.9.9/lib/net45/MySql.Data.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/MySql.Data.6.9.9/lib/net45/MySql.Data.dll
--------------------------------------------------------------------------------
/packages/SheepAspect.0.3.0.15/Content/Aspects/SampleAspect.cs.pp:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using SheepAspect.Framework;
4 | using SheepAspect.Runtime;
5 |
6 | namespace $rootNamespace$.Aspects
7 | {
8 | [Aspect]
9 | public class SampleAspect
10 | {
11 | [SelectMethods("Public & !InType:ThisAspect")]
12 | public void PublicMethods() { }
13 |
14 | [Around("PublicMethods")]
15 | public object LogAroundMethod(MethodJointPoint jp)
16 | {
17 | Trace.TraceInformation("Entering {0} on {1}. Args:{2}", jp.Method, jp.This, string.Join(",", jp.Args));
18 | try
19 | {
20 | var result = jp.Execute();
21 |
22 | if (jp.Method.ReturnType == typeof(void))
23 | result = "{void}";
24 |
25 | Trace.TraceInformation("Exitting {0}. Result: {1}", jp.Method, result);
26 | return result;
27 | }
28 | catch (Exception e)
29 | {
30 | Trace.TraceInformation("Exitting {0} with exception: '{1}'", jp.Method, e);
31 | throw;
32 | }
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/packages/SheepAspect.0.3.0.15/Content/SheepAspect.config.pp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | $OutputFileName$
6 |
7 |
8 |
9 |
10 | $OutputFileName$
11 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/SheepAspect.0.3.0.15/Content/SheepAspectConfig.xsd:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | There are 3 possible combinations of assemblies
34 | 1 - file only: SheepAspect will read the assembly from the .exe or .dll file.
35 | 2 - files: SheepAspect will find all files matching the specified pattern under the specified directory
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/packages/SheepAspect.0.3.0.15/Lib/Antlr3.Runtime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/SheepAspect.0.3.0.15/Lib/Antlr3.Runtime.dll
--------------------------------------------------------------------------------
/packages/SheepAspect.0.3.0.15/Lib/SheepAspect.XML:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SheepAspect
5 |
6 |
7 |
8 |
9 | Indicate that an aspect class will always be instantiated for every advice execution. Not recommended.
10 |
11 |
12 |
13 |
14 | Indicate that a class is a SheepAspect aspect class. By default, this attribute is the same as .
15 |
16 |
17 |
18 |
19 | Produces a
20 |
21 | Example:
22 |
23 | [SelectPropertyMethods("Getter & Name:'Is*' & InType:Namespace:'Foo.Bar.*")]
24 | public void FooGettersPointcut(){}
25 |
26 |
27 |
28 |
29 |
30 |
31 | Initializes a new instance of this class.
32 |
33 | SAQL for
34 |
35 |
36 |
37 | This advice statically adds attributes to target types, methods, properties, fields, etc.
38 |
39 | Example, to add [Foo(Bar="sheep")] and [Boom("Blah")] attributes into all properties matched by "SomePropertiesPointcut":
40 |
41 | [DeclareAttributes("SomePropertiesPointcut")]
42 | [Foo(Bar="sheep")]
43 | [Boom("Blah")]
44 | public object DummyMeaninglessProperty {get; set;}
45 |
46 |
47 |
48 |
49 |
50 |
51 | Initializes a new instance of this class.
52 | Accepts: , , , , , .
53 |
54 | Names of target pointcuts
55 |
56 |
57 |
58 | Add interface implementations to existing types.
59 | Attaching on a factory method:
60 |
61 | [DeclareMixins("TypePointcutName")]
62 | public <T:interface> FooMethod(<optional T:object> instance)
63 | {
64 | return new InterfaceImplementation();
65 | }
66 |
67 |
68 | Attaching on a field:
69 |
70 | [DeclareMixins("TypePointcutName")]
71 | public <T:interface> FooField;
72 |
73 |
74 |
75 |
76 |
77 |
78 | Initializes a new instance of this class.
79 | Accepts: .
80 |
81 | Names of target s.
82 |
83 |
84 |
85 | Other interface types to be mixed-in into the target type.
86 | Make sure the implementation returned by this advice also implements this interface.
87 |
88 |
89 |
90 |
91 | If set to true, each target instance will only inquire this aspect once to retrieve a mixin implementation.
92 | All subsequent invocations on that instance will be directed to the same mixin implementation reference.
93 | Set to false to inquire this aspect on every invocation.
94 | Default is true on methods, or false on fields.
95 |
96 |
97 |
98 |
99 | Produces a matching type constructors
100 |
101 | Example:
102 |
103 | [SelectConstructors("InType:Namespace:'Foo.Bar.*" & Args:[Implements:Name:'I*Repository', 'System.String'])]
104 | public void FooConstructorsPointcut(){}
105 |
106 |
107 |
108 |
109 |
110 |
111 | Initializes a new instance of this class.
112 |
113 | SAQL expression for
114 |
115 |
116 |
117 | Specify type for this aspect class.
118 | Aspect class without this attribute will use the value defined in ...
119 |
120 |
121 |
122 |
123 | Initializes a new class of this class.
124 |
125 | The implementation type of . It must have a public default constructor.
126 |
127 |
128 |
129 | Weavers with lower priority values will get processed earlier during compilation
130 | This is useful to ensure certain weavers only get executed after all others, hence ensuring it will not get overruled by accident
131 |
132 |
133 |
134 |
135 | Indicate that an aspect class will only be instantiated once during the lifetime of the application.
136 |
137 |
138 |
139 |
140 | Indicate that the instance of an aspect class will be associated with the of the jointpoint.
141 |
142 |
143 |
144 |
145 | Optional: name of a pointcut. If specified, the aspect will only be activated (and bound to the This instance) when the selected jointpoints are triggered.
146 | When ommitted, the aspect will be auto-activated on the first instance it's required.
147 | Accepts: , , ,
148 | , , .
149 |
150 |
151 |
152 |
153 | Produces a .
154 |
155 | Example:
156 |
157 | [SelectTypes("Name:'*Service' & Namespace:'Foo.Bar.*")]
158 | public void FooServiceTypesPointcut(){}
159 |
160 |
161 |
162 |
163 |
164 |
165 | Initializes a new instance of this class.
166 |
167 | SAQL for
168 |
169 |
170 |
171 | Initializes a new instance of this class.
172 |
173 | Types to be selected by this
174 |
175 |
176 |
177 | Produces a
178 |
179 | Example:
180 |
181 | [SelectFields("Name:'_is*' & InType:Namespace:'Foo.Bar.*")]
182 | public void FooFieldsPointcut(){}
183 |
184 |
185 |
186 |
187 |
188 |
189 | Initializes a new instance of this class.
190 |
191 | SAQL expression for
192 |
193 |
194 |
195 | Support for @otherPointcut
196 |
197 | The top-level pointcut, in case the reference is invalid and we want the exception to explain the source of the trouble
198 | Aspect that owns the referenced pointcut
199 | Name of the referenced pointcut
200 |
201 |
202 |
203 | Support for @otherPointcut
204 |
205 | The top-level pointcut, in case the reference is invalid and we want the exception to explain the source of the trouble
206 | Aspect that owns the referenced pointcut
207 | Name of the referenced pointcut
208 |
209 |
210 |
211 | Surround the execution of methods, properties, method-calls, field gets/sets instructions, etc.
212 | Usage signature:
213 |
214 | [Around("PointcutName")]
215 | public <void | T:object> FooMethod(<T:IJointPoint> jp) { ... }
216 |
217 |
218 |
219 | Example:
220 |
221 | [Around("FooPointcut")]
222 | public int AroundFooPointcut(MethodJointPoint jointPoint)
223 | {
224 | ....
225 | jointPoint.Execute();
226 | ...
227 | }
228 |
229 |
230 |
231 |
232 |
233 |
234 | Initializes a new instance of this class.
235 | Accepts: , , ,
236 | , , .
237 |
238 | Names of target pointcuts
239 |
240 |
241 |
242 | Advices with lower priority values will be applied first.
243 | Default: 100
244 |
245 |
246 |
247 |
248 | Produces a that maches a code instruction of calling a method.
249 |
250 | Example:
251 |
252 | [SelectCalMethods("Method: (Name:'Execute*' & Type:Name:'*Service')")]
253 | public void ServiceExecuteCallsPointcut(){}
254 |
255 | (The example will match the line emailService.ExecuteSend("Hello World!"); in the code)
256 |
257 |
258 |
259 |
260 |
261 | Initializes new instance of class.
262 |
263 | SAQL expression for
264 |
265 |
266 |
267 | Produces a that maches a code instruction of setting a field.
268 |
269 | Example:
270 |
271 | [SelectSetFields("Field:(Name:'_is*' & InType:Name:'*Service'"))]
272 | public void ServiceFieldSetsPointcut(){}
273 |
274 | (The example will match the line emailService._isActive = true in the code)
275 |
276 |
277 |
278 |
279 |
280 | Initializes new instance of this class.
281 |
282 | SAQL expression for
283 |
284 |
285 |
286 | Produces a that maches a code instruction of getting the value from a field.
287 |
288 | Example:
289 |
290 | [SelectGetFields("Field:(Name:'_is*' & InType:Name:'*Service'"))]
291 | public void ServiceFieldGetsPointcut(){}
292 |
293 | (The example will match the line var isActive = emailService._isActive in the code)
294 |
295 |
296 |
297 |
298 |
299 | Initializes new instance of this class.
300 |
301 | SAQL expression for
302 |
303 |
304 |
305 | Indicate that the instance of an aspect class will live within the span of a particular control flow.
306 | The control flows are defined by the pointcuts passed to the constructor of this attribute.
307 |
308 |
309 |
310 |
311 | Initializes a new class of this class.
312 | Accepts: , , ,
313 | , , .
314 |
315 |
316 | Names of pointcuts that define the control flows that mark the scope of the aspect instance lifetime.
317 |
318 |
319 |
320 |
321 | Produces a
322 |
323 | Example:
324 |
325 | [SelectMethods("Name:'Execute*' & InType:Namespace:'Foo.Bar.*")]
326 | public void FooMethodsPointcut(){}
327 |
328 |
329 |
330 |
331 |
332 |
333 | Initializes a new instance of this class.
334 |
335 | SAQL for
336 |
337 |
338 |
339 | Produces a
340 | To select property's getter and setter methods, see instead
341 |
342 | Example:
343 |
344 | [SelectProperties("Name:'Is*' & InType:Namespace:'Foo.Bar.*")]
345 | public void FooPropertiesPointcut(){}
346 |
347 |
348 |
349 |
350 |
351 |
352 | Initializes a new instance of this class.
353 |
354 | SAQL for
355 |
356 |
357 |
358 |
359 | Indicate that an aspect class will always be instantiated for every advice execution. Not recommended.
360 |
361 |
362 |
363 |
364 | Requires 2 items (object target, object this) in the evaulation stack
365 |
366 | IlProcessor, usually that of the target-method
367 | Args variable for dispatching
368 |
369 |
370 |
371 |
372 | To be appended on the static constructor, initializing static StaticJp field
373 | Already suppied as the first 2 arguments: AdviceInvoker, AdviceCallback
374 |
375 | IL processor of the static constructor
376 |
377 |
378 |
379 | Weavers with lower priority values will get processed earlier during compilation
380 | This is useful to ensure certain weavers only get executed after all others, hence ensuring it will not get overruled by accident
381 | By default: 100
382 |
383 |
384 |
385 |
386 | To be appended on the static constructor, initializing static StaticJp field
387 | Already suppied as the first 2 arguments: AdviceInvoker, AdviceCallback
388 |
389 | IL processor of the static constructor
390 |
391 |
392 |
393 | Weavers with lower priority values will get processed earlier during compilation
394 | This is useful to ensure certain weavers only get executed after all others, hence ensuring it will not get overruled by accident
395 | Priority value of FlowAspectLifecycleWeaver is 900, so it will be executed later than other MethodWeaverBase (by default: 100)
396 |
397 |
398 |
399 |
400 |
--------------------------------------------------------------------------------
/packages/SheepAspect.0.3.0.15/Lib/SheepAspect.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/SheepAspect.0.3.0.15/Lib/SheepAspect.dll
--------------------------------------------------------------------------------
/packages/SheepAspect.0.3.0.15/SheepAspect.0.3.0.15.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/SheepAspect.0.3.0.15/SheepAspect.0.3.0.15.nupkg
--------------------------------------------------------------------------------
/packages/SheepAspect.0.3.0.15/Tools/SheepAspect.Targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/packages/SheepAspect.0.3.0.15/Tools/SheepAspect.Tasks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/SheepAspect.0.3.0.15/Tools/SheepAspect.Tasks.dll
--------------------------------------------------------------------------------
/packages/SheepAspect.0.3.0.15/Tools/SheepAspectQueryAnalyzer.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyb/DBSharding/4ebc8ee24fdcf09010d519b36aca0ad1e913b5c3/packages/SheepAspect.0.3.0.15/Tools/SheepAspectQueryAnalyzer.exe
--------------------------------------------------------------------------------
/packages/SheepAspect.0.3.0.15/Tools/install.ps1:
--------------------------------------------------------------------------------
1 | param($installPath, $toolsPath, $package, $project)
2 | $project.ProjectItems.Item("SheepAspect.config").Properties.Item("CopyToOutputDirectory").Value = 1
3 |
4 | # This is the MSBuild targets file to add
5 | $targetsFile = [System.IO.Path]::Combine($toolsPath, 'SheepAspect.targets')
6 |
7 | # Add SheepAspect compiler location in the MSBuild targets
8 | # $targetXml = [Microsoft.Build.Construction.ProjectRootElement]::Open($targetsFile)
9 | # $targetXml.AddPropertyGroup().addProperty('SheepAspectLocation', $toolsPath)
10 | # $targetXml.Save()
11 |
12 | # Need to load MSBuild assembly if it's not loaded yet and grab the loaded MSBuild project for the project.
13 | Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
14 | # Grab the loaded MSBuild project for the project
15 | $msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1
16 |
17 | # Make the path to the targets file relative.
18 | $projectUri = new-object Uri('file://' + $project.FullName)
19 | $targetUri = new-object Uri('file://' + $targetsFile)
20 | $relativePath = $projectUri.MakeRelativeUri($targetUri).ToString().Replace([System.IO.Path]::AltDirectorySeparatorChar, [System.IO.Path]::DirectorySeparatorChar)
21 |
22 |
23 | # Add the import and save the project
24 | $im = $msbuild.Xml.CreateImportElement($relativePath)
25 | $im.Condition = "Exists('$relativePath')"
26 | $msbuild.Xml.InsertAfterChild($im, ($msbuild.Xml.Imports | Select-Object -Last 1))
27 |
28 | $project.Save()
--------------------------------------------------------------------------------
/packages/SheepAspect.0.3.0.15/Tools/uninstall.ps1:
--------------------------------------------------------------------------------
1 | param($installPath, $toolsPath, $package, $project)
2 | # This is the MSBuild targets file to add
3 | $targetsFile = [System.IO.Path]::Combine($toolsPath, 'SheepAspect.targets')
4 |
5 | # Need to load MSBuild assembly if it's not loaded yet.
6 | Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
7 | # Grab the loaded MSBuild project for the project
8 | $msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1
9 |
10 | # Make the path to the targets file relative.
11 | $projectUri = new-object Uri('file://' + $project.FullName)
12 | $targetUri = new-object Uri('file://' + $targetsFile)
13 | $relativePath = $projectUri.MakeRelativeUri($targetUri).ToString().Replace([System.IO.Path]::AltDirectorySeparatorChar, [System.IO.Path]::DirectorySeparatorChar)
14 |
15 | # Remove the import
16 | $msbuild.Xml.Imports | Where-Object {$_.Project -eq $relativePath } | Foreach-Object { $msbuild.Xml.RemoveChild($_) | out-null }
17 |
18 | # Remove project properties
19 | $msbuild.Xml.PropertyGroups | Where-Object {$_.Label -eq 'SheepAspectProperties' } | Foreach-Object { $msbuild.Xml.RemoveChild($_) | out-null }
20 |
21 | $project.Save()
--------------------------------------------------------------------------------