开发者

Hide 3party empty namespaces

When I add an 3party Library (Gibraltar.Agent) to a VB.NET project I get namespaces which interfere with my current code.

For example the namespace Gibraltar.Agent.IS makes the following code invalid:

  Assert.That("bla", [Is].EqualTo("bla"))

as a solution i have to fully qualify [Is]

  Assert.That("bla", Nunity.Frameworks.Is.EqualTo("bla"))

Also annoying is the "I" namespace, which makes the following invalid:

  For i = 0 to 10 'valid without referencing Gibraltar.Agent
  For i as Integer = 0 to 10 'needed change after adding Gibraltar.Agent

How can i hide the unwanted 3Party namespaces?

Hide 3party empty namespaces

EDIT

  • I did not add any Gibraltar namespaces.
  • The following does not help either:

    Imports [Is] = 开发者_如何学PythonNUnit.Framework.Is
    


You could create a new Class Library and create wrappers around the Gibraltar.Agent functionality you use, then just reference this class library instead of Gibraltar.Agent from your other projects.

See also the Adapter pattern.


These odd namespaces are created by an obfuscation library used by an older version of VistaDB which is ILMerged into the Gibraltar Agent. The obfuscator substitutes two-character symbols for VistaDB namespaces to conserve space.

We acquired VistaDB last year and now have a free hand to rework its internal structure and build process. This issue with namespaces leaking through will be resolved in Gibraltar 3.0.

Jay Cincotta
Founder
Gibraltar Software


Just don’t Import that namespace in your files. You may need to change the project settings if you have at some time in the past activated that namespace for inclusion in your project settings.

But according to the documentation the objectionable names don’t even exist.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜