-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#231 - Analyze actual usage of properties and include the results in …
…the security overview
- Loading branch information
Showing
20 changed files
with
282 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
src/IntelliTect.Coalesce.Tests/TargetClasses/TestDbContext/ExternalChild.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/IntelliTect.Coalesce/TypeDefinition/MethodReturnViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
|
||
#nullable enable | ||
|
||
namespace IntelliTect.Coalesce.TypeDefinition | ||
{ | ||
/// <summary> | ||
/// Shim of a method's return value so it can be treated as an IValueViewModel. | ||
/// </summary> | ||
public class MethodReturnViewModel : IValueViewModel | ||
{ | ||
internal MethodReturnViewModel(MethodViewModel method) | ||
{ | ||
Method = method; | ||
Type = method.ResultType; | ||
} | ||
|
||
public string Name => "$return"; | ||
|
||
public string JsVariable => Name; | ||
|
||
public string DisplayName => "Result"; // TODO: i18n | ||
|
||
public string? Description => null; | ||
|
||
public TypeViewModel Type { get; } | ||
|
||
public TypeViewModel PureType => Type.PureType; | ||
|
||
public MethodViewModel Method { get; } | ||
|
||
public object? GetAttributeValue<TAttribute>(string valueName) where TAttribute : Attribute | ||
=> Method.GetAttributeValue<TAttribute>(valueName); | ||
|
||
public bool HasAttribute<TAttribute>() where TAttribute : Attribute | ||
=> Method.HasAttribute<TAttribute>(); | ||
} | ||
} |
Oops, something went wrong.