4using Microsoft.VisualStudio.TestTools.UnitTesting;
7using System.Threading.Tasks;
15 private const string AMethod = nameof(AMethod);
16 private const string DP_Create = nameof(DP_Create);
17 private const string DP_Fetch = nameof(DP_Fetch);
18 private const string DP_Insert = nameof(DP_Insert);
19 private const string DP_Update = nameof(DP_Update);
20 private const string DP_Delete = nameof(DP_Delete);
21 private const string DP_DeleteSelf = nameof(DP_DeleteSelf);
22 private const string DP_Execute = nameof(DP_Execute);
23 private const string C_Create = nameof(C_Create);
24 private const string C_Fetch = nameof(C_Fetch);
25 private const string C_Insert = nameof(C_Insert);
26 private const string C_Update = nameof(C_Update);
27 private const string C_DeleteSelf = nameof(C_DeleteSelf);
28 private const string C_Execute = nameof(C_Execute);
30 private static readonly
string DataPortalOperationCode =
33namespace Csla.Analyzers.Tests.Targets.IMethodSymbolExtensionsTests
35 public class DataPortalOperations
37 public void {AMethod} () {{ }}
39 public void {CslaMemberConstants.Operations.DataPortalCreate}() {{ }}
40 public void {CslaMemberConstants.Operations.DataPortalFetch}() {{ }}
41 public void {CslaMemberConstants.Operations.DataPortalInsert}() {{ }}
42 public void {CslaMemberConstants.Operations.DataPortalUpdate}() {{ }}
43 public void {CslaMemberConstants.Operations.DataPortalDelete}() {{ }}
44 public void {CslaMemberConstants.Operations.DataPortalDeleteSelf}() {{ }}
45 public void {CslaMemberConstants.Operations.DataPortalExecute}() {{ }}
46 public void {CslaMemberConstants.Operations.ChildCreate}() {{ }}
47 public void {CslaMemberConstants.Operations.ChildFetch}() {{ }}
48 public void {CslaMemberConstants.Operations.ChildInsert}() {{ }}
49 public void {CslaMemberConstants.Operations.ChildUpdate}() {{ }}
50 public void {CslaMemberConstants.Operations.ChildDeleteSelf}() {{ }}
51 public void {CslaMemberConstants.Operations.ChildExecute}() {{ }}
53 [Create] public void {DP_Create}() {{ }}
54 [Fetch] public void {DP_Fetch}() {{ }}
55 [Insert] public void {DP_Insert}() {{ }}
56 [Update] public void {DP_Update}() {{ }}
57 [Delete] public void {DP_Delete}() {{ }}
58 [DeleteSelf] public void {DP_DeleteSelf}() {{ }}
59 [Execute] public void {DP_Execute}() {{ }}
60 [CreateChild] public void {C_Create}() {{ }}
61 [FetchChild] public void {C_Fetch}() {{ }}
62 [InsertChild] public void {C_Insert}() {{ }}
63 [UpdateChild] public void {C_Update}() {{ }}
64 [DeleteSelfChild] public void {C_DeleteSelf}() {{ }}
65 [ExecuteChild] public void {C_Execute}() {{ }}
68 private const string PropertyInfoManagementCode =
69@"namespace Csla.Analyzers.Tests.Targets.IMethodSymbolExtensionsTests
71 public class PropertyInfoManagementMethods
72 : BusinessBase<PropertyInfoManagementMethods>
76 this.GetProperty(null);
77 this.GetPropertyConvert<string, string>(null, null);
78 this.SetProperty(null, null);
79 this.SetPropertyConvert<string, string>(null, null);
80 this.LoadProperty(null, null);
81 this.LoadPropertyAsync<string>(null, null);
82 this.LoadPropertyConvert<string, string>(null, null);
83 this.LoadPropertyMarkDirty(null, null);
84 this.ReadProperty(null);
85 this.ReadPropertyConvert<string, string>(null);
86 this.LazyGetProperty<string>(null, null);
87 this.LazyGetPropertyAsync<string>(null, null);
88 this.LazyReadProperty<string>(null, null);
89 this.LazyReadPropertyAsync<string>(null, null);
93 private void Something() { }
100 Assert.IsFalse((
null as IMethodSymbol).IsPropertyInfoManagementMethod());
106 Assert.IsFalse((await GetMethodReferenceSymbolAsync(
107 PropertyInfoManagementCode,
"Something")).IsPropertyInfoManagementMethod());
113 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
114 PropertyInfoManagementCode, CslaMemberConstants.Properties.SetProperty)).IsPropertyInfoManagementMethod());
120 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
121 PropertyInfoManagementCode, CslaMemberConstants.Properties.SetPropertyConvert)).IsPropertyInfoManagementMethod());
127 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
128 PropertyInfoManagementCode, CslaMemberConstants.Properties.GetProperty)).IsPropertyInfoManagementMethod());
130 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
131 PropertyInfoManagementCode, CslaMemberConstants.Properties.GetProperty)).IsPropertyInfoManagementMethod());
137 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
138 PropertyInfoManagementCode, CslaMemberConstants.Properties.GetPropertyConvert)).IsPropertyInfoManagementMethod());
140 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
141 PropertyInfoManagementCode, CslaMemberConstants.Properties.GetPropertyConvert)).IsPropertyInfoManagementMethod());
147 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
148 PropertyInfoManagementCode, CslaMemberConstants.Properties.LazyGetProperty)).IsPropertyInfoManagementMethod());
150 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
151 PropertyInfoManagementCode, CslaMemberConstants.Properties.LazyGetProperty)).IsPropertyInfoManagementMethod());
157 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
158 PropertyInfoManagementCode, CslaMemberConstants.Properties.LazyGetPropertyAsync)).IsPropertyInfoManagementMethod());
160 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
161 PropertyInfoManagementCode, CslaMemberConstants.Properties.LazyGetPropertyAsync)).IsPropertyInfoManagementMethod());
167 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
168 PropertyInfoManagementCode, CslaMemberConstants.Properties.LazyReadProperty)).IsPropertyInfoManagementMethod());
170 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
171 PropertyInfoManagementCode, CslaMemberConstants.Properties.LazyReadProperty)).IsPropertyInfoManagementMethod());
177 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
178 PropertyInfoManagementCode, CslaMemberConstants.Properties.LazyReadPropertyAsync)).IsPropertyInfoManagementMethod());
180 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
181 PropertyInfoManagementCode, CslaMemberConstants.Properties.LazyReadPropertyAsync)).IsPropertyInfoManagementMethod());
187 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
188 PropertyInfoManagementCode, CslaMemberConstants.Properties.LoadPropertyAsync)).IsPropertyInfoManagementMethod());
190 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
191 PropertyInfoManagementCode, CslaMemberConstants.Properties.LoadPropertyAsync)).IsPropertyInfoManagementMethod());
197 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
198 PropertyInfoManagementCode, CslaMemberConstants.Properties.LoadPropertyMarkDirty)).IsPropertyInfoManagementMethod());
200 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
201 PropertyInfoManagementCode, CslaMemberConstants.Properties.LoadPropertyMarkDirty)).IsPropertyInfoManagementMethod());
207 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
208 PropertyInfoManagementCode, CslaMemberConstants.Properties.ReadProperty)).IsPropertyInfoManagementMethod());
210 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
211 PropertyInfoManagementCode, CslaMemberConstants.Properties.ReadProperty)).IsPropertyInfoManagementMethod());
213 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
214 PropertyInfoManagementCode, CslaMemberConstants.Properties.ReadProperty)).IsPropertyInfoManagementMethod());
220 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
221 PropertyInfoManagementCode, CslaMemberConstants.Properties.ReadPropertyConvert)).IsPropertyInfoManagementMethod());
223 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
224 PropertyInfoManagementCode, CslaMemberConstants.Properties.ReadPropertyConvert)).IsPropertyInfoManagementMethod());
226 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
227 PropertyInfoManagementCode, CslaMemberConstants.Properties.ReadPropertyConvert)).IsPropertyInfoManagementMethod());
233 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
234 PropertyInfoManagementCode, CslaMemberConstants.Properties.LoadProperty)).IsPropertyInfoManagementMethod());
236 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
237 PropertyInfoManagementCode, CslaMemberConstants.Properties.LoadProperty)).IsPropertyInfoManagementMethod());
239 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
240 PropertyInfoManagementCode, CslaMemberConstants.Properties.LoadProperty)).IsPropertyInfoManagementMethod());
246 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
247 PropertyInfoManagementCode, CslaMemberConstants.Properties.LoadPropertyConvert)).IsPropertyInfoManagementMethod());
249 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
250 PropertyInfoManagementCode, CslaMemberConstants.Properties.LoadPropertyConvert)).IsPropertyInfoManagementMethod());
252 Assert.IsTrue((await GetMethodReferenceSymbolAsync(
253 PropertyInfoManagementCode, CslaMemberConstants.Properties.LoadPropertyConvert)).IsPropertyInfoManagementMethod());
258 Assert.IsFalse((
null as IMethodSymbol).IsDataPortalOperation());
262 Assert.IsFalse((
null as IMethodSymbol).IsRootDataPortalOperation());
266 Assert.IsFalse((
null as IMethodSymbol).IsChildDataPortalOperation());
270 Assert.IsFalse((await GetMethodSymbolAsync(
271 DataPortalOperationCode, AMethod)).IsDataPortalOperation());
275 Assert.IsFalse((await GetMethodSymbolAsync(
276 DataPortalOperationCode, AMethod)).IsRootDataPortalOperation());
280 Assert.IsFalse((await GetMethodSymbolAsync(
281 DataPortalOperationCode, AMethod)).IsChildDataPortalOperation());
285 Assert.IsTrue((await GetMethodSymbolAsync(
286 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalCreate)).IsDataPortalOperation());
290 Assert.IsTrue((await GetMethodSymbolAsync(
291 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalCreate)).IsRootDataPortalOperation());
295 Assert.IsFalse((await GetMethodSymbolAsync(
296 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalCreate)).IsChildDataPortalOperation());
300 Assert.IsTrue((await GetMethodSymbolAsync(
301 DataPortalOperationCode, DP_Create)).IsDataPortalOperation());
305 Assert.IsTrue((await GetMethodSymbolAsync(
306 DataPortalOperationCode, DP_Create)).IsRootDataPortalOperation());
310 Assert.IsFalse((await GetMethodSymbolAsync(
311 DataPortalOperationCode, DP_Create)).IsChildDataPortalOperation());
315 Assert.IsTrue((await GetMethodSymbolAsync(
316 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalFetch)).IsDataPortalOperation());
320 Assert.IsTrue((await GetMethodSymbolAsync(
321 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalFetch)).IsRootDataPortalOperation());
325 Assert.IsFalse((await GetMethodSymbolAsync(
326 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalFetch)).IsChildDataPortalOperation());
330 Assert.IsTrue((await GetMethodSymbolAsync(
331 DataPortalOperationCode, DP_Fetch)).IsDataPortalOperation());
335 Assert.IsTrue((await GetMethodSymbolAsync(
336 DataPortalOperationCode, DP_Fetch)).IsRootDataPortalOperation());
340 Assert.IsFalse((await GetMethodSymbolAsync(
341 DataPortalOperationCode, DP_Fetch)).IsChildDataPortalOperation());
345 Assert.IsTrue((await GetMethodSymbolAsync(
346 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalInsert)).IsDataPortalOperation());
350 Assert.IsTrue((await GetMethodSymbolAsync(
351 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalInsert)).IsRootDataPortalOperation());
355 Assert.IsFalse((await GetMethodSymbolAsync(
356 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalInsert)).IsChildDataPortalOperation());
360 Assert.IsTrue((await GetMethodSymbolAsync(
361 DataPortalOperationCode, DP_Insert)).IsDataPortalOperation());
365 Assert.IsTrue((await GetMethodSymbolAsync(
366 DataPortalOperationCode, DP_Insert)).IsRootDataPortalOperation());
370 Assert.IsFalse((await GetMethodSymbolAsync(
371 DataPortalOperationCode, DP_Insert)).IsChildDataPortalOperation());
375 Assert.IsTrue((await GetMethodSymbolAsync(
376 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalUpdate)).IsDataPortalOperation());
380 Assert.IsTrue((await GetMethodSymbolAsync(
381 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalUpdate)).IsRootDataPortalOperation());
385 Assert.IsFalse((await GetMethodSymbolAsync(
386 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalUpdate)).IsChildDataPortalOperation());
390 Assert.IsTrue((await GetMethodSymbolAsync(
391 DataPortalOperationCode, DP_Update)).IsDataPortalOperation());
395 Assert.IsTrue((await GetMethodSymbolAsync(
396 DataPortalOperationCode, DP_Update)).IsRootDataPortalOperation());
400 Assert.IsFalse((await GetMethodSymbolAsync(
401 DataPortalOperationCode, DP_Update)).IsChildDataPortalOperation());
405 Assert.IsTrue((await GetMethodSymbolAsync(
406 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalDelete)).IsDataPortalOperation());
410 Assert.IsTrue((await GetMethodSymbolAsync(
411 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalDelete)).IsRootDataPortalOperation());
415 Assert.IsFalse((await GetMethodSymbolAsync(
416 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalDelete)).IsChildDataPortalOperation());
420 Assert.IsTrue((await GetMethodSymbolAsync(
421 DataPortalOperationCode, DP_Delete)).IsDataPortalOperation());
425 Assert.IsTrue((await GetMethodSymbolAsync(
426 DataPortalOperationCode, DP_Delete)).IsRootDataPortalOperation());
430 Assert.IsFalse((await GetMethodSymbolAsync(
431 DataPortalOperationCode, DP_Delete)).IsChildDataPortalOperation());
435 Assert.IsTrue((await GetMethodSymbolAsync(
436 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalDeleteSelf)).IsDataPortalOperation());
440 Assert.IsTrue((await GetMethodSymbolAsync(
441 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalDeleteSelf)).IsRootDataPortalOperation());
445 Assert.IsFalse((await GetMethodSymbolAsync(
446 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalDeleteSelf)).IsChildDataPortalOperation());
450 Assert.IsTrue((await GetMethodSymbolAsync(
451 DataPortalOperationCode, DP_DeleteSelf)).IsDataPortalOperation());
455 Assert.IsTrue((await GetMethodSymbolAsync(
456 DataPortalOperationCode, DP_DeleteSelf)).IsRootDataPortalOperation());
460 Assert.IsFalse((await GetMethodSymbolAsync(
461 DataPortalOperationCode, DP_DeleteSelf)).IsChildDataPortalOperation());
465 Assert.IsTrue((await GetMethodSymbolAsync(
466 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalExecute)).IsDataPortalOperation());
470 Assert.IsTrue((await GetMethodSymbolAsync(
471 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalExecute)).IsRootDataPortalOperation());
475 Assert.IsFalse((await GetMethodSymbolAsync(
476 DataPortalOperationCode, CslaMemberConstants.Operations.DataPortalExecute)).IsChildDataPortalOperation());
480 Assert.IsTrue((await GetMethodSymbolAsync(
481 DataPortalOperationCode, DP_Execute)).IsDataPortalOperation());
485 Assert.IsTrue((await GetMethodSymbolAsync(
486 DataPortalOperationCode, DP_Execute)).IsRootDataPortalOperation());
490 Assert.IsFalse((await GetMethodSymbolAsync(
491 DataPortalOperationCode, DP_Execute)).IsChildDataPortalOperation());
495 Assert.IsTrue((await GetMethodSymbolAsync(
496 DataPortalOperationCode, CslaMemberConstants.Operations.ChildCreate)).IsDataPortalOperation());
500 Assert.IsFalse((await GetMethodSymbolAsync(
501 DataPortalOperationCode, CslaMemberConstants.Operations.ChildCreate)).IsRootDataPortalOperation());
505 Assert.IsTrue((await GetMethodSymbolAsync(
506 DataPortalOperationCode, CslaMemberConstants.Operations.ChildCreate)).IsChildDataPortalOperation());
510 Assert.IsTrue((await GetMethodSymbolAsync(
511 DataPortalOperationCode, C_Create)).IsDataPortalOperation());
515 Assert.IsFalse((await GetMethodSymbolAsync(
516 DataPortalOperationCode, C_Create)).IsRootDataPortalOperation());
520 Assert.IsTrue((await GetMethodSymbolAsync(
521 DataPortalOperationCode, C_Create)).IsChildDataPortalOperation());
525 Assert.IsTrue((await GetMethodSymbolAsync(
526 DataPortalOperationCode, CslaMemberConstants.Operations.ChildFetch)).IsDataPortalOperation());
530 Assert.IsFalse((await GetMethodSymbolAsync(
531 DataPortalOperationCode, CslaMemberConstants.Operations.ChildFetch)).IsRootDataPortalOperation());
535 Assert.IsTrue((await GetMethodSymbolAsync(
536 DataPortalOperationCode, CslaMemberConstants.Operations.ChildFetch)).IsChildDataPortalOperation());
540 Assert.IsTrue((await GetMethodSymbolAsync(
541 DataPortalOperationCode, C_Fetch)).IsDataPortalOperation());
545 Assert.IsFalse((await GetMethodSymbolAsync(
546 DataPortalOperationCode, C_Fetch)).IsRootDataPortalOperation());
550 Assert.IsTrue((await GetMethodSymbolAsync(
551 DataPortalOperationCode, C_Fetch)).IsChildDataPortalOperation());
555 Assert.IsTrue((await GetMethodSymbolAsync(
556 DataPortalOperationCode, CslaMemberConstants.Operations.ChildInsert)).IsDataPortalOperation());
560 Assert.IsFalse((await GetMethodSymbolAsync(
561 DataPortalOperationCode, CslaMemberConstants.Operations.ChildInsert)).IsRootDataPortalOperation());
565 Assert.IsTrue((await GetMethodSymbolAsync(
566 DataPortalOperationCode, CslaMemberConstants.Operations.ChildInsert)).IsChildDataPortalOperation());
570 Assert.IsTrue((await GetMethodSymbolAsync(
571 DataPortalOperationCode, C_Insert)).IsDataPortalOperation());
575 Assert.IsFalse((await GetMethodSymbolAsync(
576 DataPortalOperationCode, C_Insert)).IsRootDataPortalOperation());
580 Assert.IsTrue((await GetMethodSymbolAsync(
581 DataPortalOperationCode, C_Insert)).IsChildDataPortalOperation());
585 Assert.IsTrue((await GetMethodSymbolAsync(
586 DataPortalOperationCode, CslaMemberConstants.Operations.ChildUpdate)).IsDataPortalOperation());
590 Assert.IsFalse((await GetMethodSymbolAsync(
591 DataPortalOperationCode, CslaMemberConstants.Operations.ChildUpdate)).IsRootDataPortalOperation());
595 Assert.IsTrue((await GetMethodSymbolAsync(
596 DataPortalOperationCode, CslaMemberConstants.Operations.ChildUpdate)).IsChildDataPortalOperation());
600 Assert.IsTrue((await GetMethodSymbolAsync(
601 DataPortalOperationCode, C_Update)).IsDataPortalOperation());
605 Assert.IsFalse((await GetMethodSymbolAsync(
606 DataPortalOperationCode, C_Update)).IsRootDataPortalOperation());
610 Assert.IsTrue((await GetMethodSymbolAsync(
611 DataPortalOperationCode, C_Update)).IsChildDataPortalOperation());
615 Assert.IsTrue((await GetMethodSymbolAsync(
616 DataPortalOperationCode, CslaMemberConstants.Operations.ChildDeleteSelf)).IsDataPortalOperation());
620 Assert.IsFalse((await GetMethodSymbolAsync(
621 DataPortalOperationCode, CslaMemberConstants.Operations.ChildDeleteSelf)).IsRootDataPortalOperation());
625 Assert.IsTrue((await GetMethodSymbolAsync(
626 DataPortalOperationCode, CslaMemberConstants.Operations.ChildDeleteSelf)).IsChildDataPortalOperation());
630 Assert.IsTrue((await GetMethodSymbolAsync(
631 DataPortalOperationCode, CslaMemberConstants.Operations.ChildExecute)).IsDataPortalOperation());
635 Assert.IsFalse((await GetMethodSymbolAsync(
636 DataPortalOperationCode, CslaMemberConstants.Operations.ChildExecute)).IsRootDataPortalOperation());
640 Assert.IsTrue((await GetMethodSymbolAsync(
641 DataPortalOperationCode, CslaMemberConstants.Operations.ChildExecute)).IsChildDataPortalOperation());
645 Assert.IsTrue((await GetMethodSymbolAsync(
646 DataPortalOperationCode, C_Execute)).IsDataPortalOperation());
650 Assert.IsFalse((await GetMethodSymbolAsync(
651 DataPortalOperationCode, C_Execute)).IsRootDataPortalOperation());
655 Assert.IsTrue((await GetMethodSymbolAsync(
656 DataPortalOperationCode, C_Execute)).IsChildDataPortalOperation());
658 private static async Task<(SemanticModel, SyntaxNode)> ParseFileAsync(
string code)
660 var tree = CSharpSyntaxTree.ParseText(code);
661 var compilation = CSharpCompilation.Create(
662 Guid.NewGuid().ToString(
"N"),
663 syntaxTrees:
new[] { tree },
664 references: AssemblyReferences.GetMetadataReferences(
new[]
666 typeof(
object).Assembly,
668 typeof(Attribute).Assembly
671 return (compilation.GetSemanticModel(tree), await tree.GetRootAsync().ConfigureAwait(
false));
674 private async Task<IMethodSymbol> GetMethodSymbolAsync(
string code,
string name)
676 var (model, root) = await ParseFileAsync(code);
678 foreach (var method
in root.DescendantNodes().OfType<MethodDeclarationSyntax>())
680 if (model.GetDeclaredSymbol(method) is IMethodSymbol methodNode && methodNode.Name == name)
689 private async Task<IMethodSymbol> GetMethodReferenceSymbolAsync(
string code,
string name)
691 var (model, root) = await ParseFileAsync(code);
693 foreach (var invocation
in root.DescendantNodes().OfType<InvocationExpressionSyntax>())
695 var symbol = model.GetSymbolInfo(invocation);
696 var methodSymbol = symbol.Symbol as IMethodSymbol;
698 if (methodSymbol?.Name == name)
async Task IsRootDataPortalOperationForDataPortalCreateWithAttribute()
void IsPropertyInfoManagementMethodWhenSymbolIsNull()
async Task IsChildDataPortalOperationForChildExecute()
async Task IsRootDataPortalOperationForDataPortalDeleteSelfWithAttribute()
async Task IsChildDataPortalOperationForDataPortalCreate()
async Task IsChildDataPortalOperationForDataPortalDelete()
async Task IsChildDataPortalOperationForChildUpdateWithAttribute()
async Task IsPropertyInfoManagementMethodForSetProperty()
async Task IsDataPortalOperationForDataPortalFetchWithAttribute()
async Task IsPropertyInfoManagementMethodForLoadPropertyConvert()
async Task IsRootDataPortalOperationForDataPortalUpdate()
async Task IsDataPortalOperationForDataPortalExecute()
async Task IsPropertyInfoManagementMethodForLoadPropertyAsync()
async Task IsRootDataPortalOperationForDataPortalDeleteSelf()
async Task IsRootDataPortalOperationForChildCreateWithAttribute()
async Task IsRootDataPortalOperationForDataPortalDelete()
async Task IsDataPortalOperationForMethodThatIsNotADataPortalOperation()
async Task IsRootDataPortalOperationForChildExecute()
async Task IsRootDataPortalOperationForChildUpdateWithAttribute()
async Task IsDataPortalOperationForChildInsertWithAttribute()
async Task IsPropertyInfoManagementMethodForLazyReadProperty()
async Task IsChildDataPortalOperationForDataPortalInsert()
async Task IsDataPortalOperationForDataPortalDeleteSelf()
async Task IsRootDataPortalOperationForDataPortalFetch()
async Task IsRootDataPortalOperationForDataPortalFetchWithAttribute()
async Task IsRootDataPortalOperationForChildInsert()
async Task IsChildDataPortalOperationForDataPortalDeleteWithAttribute()
async Task IsDataPortalOperationForDataPortalCreateWithAttribute()
async Task IsRootDataPortalOperationForChildExecuteWithAttribute()
async Task IsRootDataPortalOperationForDataPortalExecuteWithAttribute()
async Task IsDataPortalOperationForChildInsert()
async Task IsChildDataPortalOperationForChildInsertWithAttribute()
async Task IsDataPortalOperationForDataPortalInsertWithAttribute()
async Task IsDataPortalOperationForDataPortalDeleteSelfWithAttribute()
async Task IsChildDataPortalOperationForDataPortalFetchWithAttribute()
async Task IsRootDataPortalOperationForChildFetch()
async Task IsPropertyInfoManagementMethodForLoadProperty()
async Task IsDataPortalOperationForDataPortalUpdateWithAttribute()
async Task IsChildDataPortalOperationForChildUpdate()
async Task IsRootDataPortalOperationForChildUpdate()
async Task IsChildDataPortalOperationForDataPortalDeleteSelfWithAttribute()
async Task IsDataPortalOperationForDataPortalExecuteWithAttribute()
async Task IsChildDataPortalOperationForChildFetchWithAttribute()
async Task IsRootDataPortalOperationForMethodThatIsNotADataPortalOperation()
async Task IsChildDataPortalOperationForChildExecuteWithAttribute()
async Task IsChildDataPortalOperationForChildCreate()
async Task IsRootDataPortalOperationForDataPortalDeleteWithAttribute()
async Task IsDataPortalOperationForChildExecuteWithAttribute()
async Task IsChildDataPortalOperationForDataPortalFetch()
async Task IsPropertyInfoManagementMethodForReadProperty()
async Task IsPropertyInfoManagementMethodForGetPropertyConvert()
async Task IsDataPortalOperationForDataPortalFetch()
async Task IsPropertyInfoManagementMethodForSetPropertyConvert()
async Task IsDataPortalOperationForChildCreate()
async Task IsChildDataPortalOperationForDataPortalInsertWithAttribute()
async Task IsDataPortalOperationForChildUpdateWithAttribute()
async Task IsRootDataPortalOperationForDataPortalInsert()
async Task IsDataPortalOperationForChildFetch()
async Task IsDataPortalOperationForChildDeleteSelf()
async Task IsPropertyInfoManagementMethodForLazyGetPropertyAsync()
async Task IsChildDataPortalOperationForDataPortalExecuteWithAttribute()
async Task IsDataPortalOperationForDataPortalInsert()
async Task IsChildDataPortalOperationForChildInsert()
async Task IsChildDataPortalOperationForDataPortalUpdateWithAttribute()
async Task IsRootDataPortalOperationForChildCreate()
async Task IsRootDataPortalOperationForChildInsertWithAttribute()
async Task IsPropertyInfoManagementMethodForLoadPropertyMarkDirty()
void IsChildDataPortalOperationWhenSymbolIsNull()
async Task IsPropertyInfoManagementMethodForGetProperty()
async Task IsChildDataPortalOperationForChildCreateWithAttribute()
void IsDataPortalOperationWhenSymbolIsNull()
async Task IsRootDataPortalOperationForDataPortalCreate()
async Task IsPropertyInfoManagementMethodForLazyGetProperty()
async Task IsDataPortalOperationForDataPortalDeleteWithAttribute()
async Task IsDataPortalOperationForChildCreateWithAttribute()
async Task IsChildDataPortalOperationForDataPortalExecute()
async Task IsDataPortalOperationForChildExecute()
async Task IsChildDataPortalOperationForDataPortalDeleteSelf()
async Task IsChildDataPortalOperationForDataPortalCreateWithAttribute()
async Task IsRootDataPortalOperationForDataPortalUpdateWithAttribute()
async Task IsChildDataPortalOperationForChildFetch()
async Task IsChildDataPortalOperationForChildDeleteSelf()
async Task IsRootDataPortalOperationForChildDeleteSelf()
async Task IsDataPortalOperationForDataPortalDelete()
async Task IsChildDataPortalOperationForMethodThatIsNotADataPortalOperation()
async Task IsDataPortalOperationForChildFetchWithAttribute()
async Task IsDataPortalOperationForChildUpdate()
async Task IsDataPortalOperationForDataPortalCreate()
void IsRootDataPortalOperationWhenSymbolIsNull()
async Task IsPropertyInfoManagementMethodForReadPropertyConvert()
async Task IsChildDataPortalOperationForDataPortalUpdate()
async Task IsRootDataPortalOperationForChildFetchWithAttribute()
async Task IsPropertyInfoManagementMethodForLazyReadPropertyAsync()
async Task IsPropertyInfoManagementMethodForMethodThatIsNotAPropertyInfoManagementMethod()
async Task IsDataPortalOperationForDataPortalUpdate()
async Task IsRootDataPortalOperationForDataPortalInsertWithAttribute()
async Task IsRootDataPortalOperationForDataPortalExecute()
This is the base class from which most business objects will be derived.