Skip to content

Instantly share code, notes, and snippets.

@controlflow
Last active December 3, 2020 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save controlflow/af763f8356f3f3703a8b8c540215734a to your computer and use it in GitHub Desktop.
Save controlflow/af763f8356f3f3703a8b8c540215734a to your computer and use it in GitHub Desktop.
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