Skip to content

Instantly share code, notes, and snippets.

@controlflow
Last active December 3, 2020 15:10
Embed
What would you like to do?
private static bool IsPossibleCodeBehind(IFile file)
{
return file is IFileImpl {SecondaryRangeTranslator: { } translator} && !(translator is IInjectedRangeTranslator);
}
private static bool IsPossibleCodeBehind(IFile file)
{
return file is IFileImpl { SecondaryRangeTranslator: { } and not IInjectedRangeTranslator };
return file is IFileImpl { SecondaryRangeTranslator: not (null or IInjectedRangeTranslator) };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment