Last active
November 21, 2019 23:23
-
-
Save controlflow/80ca47fa7ff1938732e9a42121d1f70a to your computer and use it in GitHub Desktop.
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
var elementType = GetElementType(declaredElement); | |
if (elementType is IDeclaredType declaredType) | |
{ | |
var delegateInvokeMethod = declaredType.GetTypeElement<IDelegate>()?.InvokeMethod; | |
if (delegateInvokeMethod != null) | |
{ | |
var returnType = declaredType.GetSubstitution()[delegateInvokeMethod.ReturnType]; | |
if (returnType.IsValid()) | |
{ |
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
var elementType = GetElementType(declaredElement); | |
if (elementType is IDeclaredType (IDelegate { InvokeMethod: { ReturnType: returnType } }, subtitution)) | |
{ | |
var returnType1 = subtitution[returnType]; | |
if (returnType1.IsValid()) | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment