Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isnot in vb source #24

Closed
omegaminus opened this issue May 17, 2019 · 2 comments
Closed

Isnot in vb source #24

omegaminus opened this issue May 17, 2019 · 2 comments
Labels
enhancement A request for additional functionality

Comments

@omegaminus
Copy link

  1. The IsNot operator cannot be used to compare expressions returned from the TypeOf operator. Instead, you must use the Not and Is operators. See
    https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/isnot-operator#remarks
  2. localization issue of .adml files (came across with de-AT where there is only de-DE subdir)
    additional code in Function AddSingleAdmx as follows:
    Dim admlPath = Path.ChangeExtension(AdmxPath.Replace(fileTitle, LanguageCode & "" & fileTitle), "adml")
    --------- insert starts
    If Not File.Exists(admlPath) Then
    'try find another localization language flavor
    For Each _locDirectory As String In Directory.GetDirectories(Path.GetDirectoryName(AdmxPath), LanguageCode.Split("-")(0) & "-*")
    admlPath = Path.Combine(_locDirectory, Path.ChangeExtension(fileTitle, "adml"))
    If File.Exists(admlPath) Then Exit For
    Next
    End If
    ----------- insert ends
    If Not File.Exists(admlPath) Then admlPath = Path.ChangeExtension(AdmxPath.Replace(fileTitle, "en-US" & fileTitle), "adml")
@Fleex255 Fleex255 added the enhancement A request for additional functionality label May 17, 2019
@Fleex255
Copy link
Owner

Thanks for the feedback!

Regarding Part 1: The ability to use IsNot with TypeOf is a relatively recent addition to the language, so it's possible that some documentation wasn't updated yet. A different Microsoft Docs page shows the syntax.

Part 2 is implemented in c38e756. The dev build has been updated - could you please try that and see if it works as you like?

@omegaminus
Copy link
Author

Hi Ben, glad to help.
ad 1: The inability to use IsNot seemingly is an issue of vs2012 I used.
ad 2: looked at the source, should work (I'm not at the machine containing the source now), executable works!
Great job, thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A request for additional functionality
Projects
None yet
Development

No branches or pull requests

2 participants