Last active
January 29, 2019 16:00
-
-
Save controlflow/a049247d4b85aaf9920d84528eff8930 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var isInGeneratedCode = IsInGeneratedCode(node, parameters.RegionsInfo); | |
UsageState state; | |
if (isInGeneratedCode != null) | |
{ | |
state = (bool) isInGeneratedCode | |
? UsageState.METHOD_ASSIGNED_TO_DELEGATE_IN_GENERATED_CODE | |
: UsageState.METHOD_ASSIGNED_TO_DELEGATE_IN_USER_CODE; | |
} | |
else | |
{ | |
state = UsageState.METHOD_ASSIGNED_TO_DELEGATE_MASK; | |
} | |
parameters.UsageData.SetElementState(method, state); |
This file contains hidden or 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
var state = IsInGeneratedCode(node, parameters.RegionsInfo) switch { | |
true => UsageState.METHOD_ASSIGNED_TO_DELEGATE_IN_GENERATED_CODE, | |
false => UsageState.METHOD_ASSIGNED_TO_DELEGATE_IN_USER_CODE, | |
null => UsageState.METHOD_ASSIGNED_TO_DELEGATE_MASK | |
}; | |
parameters.UsageData.SetElementState(method, state); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment