Luminous Code API
Luminous.Code.Core is a plain C# class library project that contains the lower level classes, methods and extension methods that get used by more
Note the lack of
Corein the namespace names. I decided that there was no benefit to including it in the namespaces because it sometimes made the namespaces sound a bit odd.
String Extensions Namespace
Luminous.Code.StringExtensions namespace is fairly self-explanatory.
It contains a set of extension methods that extend the
Visual Studio API
Luminous.Code.VisualStudio is a plain C# class library project that contains the lower level classes, methods and extension methods that pertain to creating
Visual Studio extensions.
It has a project reference to the
Luminous.Code.Core project, as it relies on some of the code in it.
Luminous.Code.VisualStudio.Packages namespace contains all of the plumbing code that
a Visual Studio package needs to interact with the Visual Studio IDE.
Luminous.Code.VisualStudio.Packages.LuminousPackage class is an abstract base class that you inherit your own
packages from. It abstracts away the
Microsoft.VisualStudio.Shell.Package and command interact with the Visual Studio IDE.
Luminous.Code.VisualStudio.Commands namespace contains all of the plumbing code that
a command needs to interact with the Visual Studio IDE (via the command's parent package).
Luminous.Code.VisualStudio.Commands.LuminousCommand class is an abstract class, which acts as the
common base class for the
StaticCommand class and the
It contains all of the plumbing code that a command needs to interact easily with its parent package, which has the ability to communicate with the IDE.
Luminous.Code.VisualStudio.Commands.StaticCommand class is useful for commands whose text doesn't need to change,
and which are always visible and always enabled.
Luminous.Code.VisualStudio.Commands.DynamicCommand class can be used for commands whose text may need to change, and/or which may
need to dynamically determine if the command needs to be visible or enabled.
Three sensibly-named overridable properties are provided to make this easy and flexible.
Both the command's
Visible property and
Enabled property are automatically calculated based on the values of
false, the command cannot be executed at all.
Enabled properties will both be set to
For example, command classes that inherit from
DynamicCommand can override this
property to return, say, a package-wide value that can be set in Tools | Options,
or use some other method of determining if the command's functionality should be turned
false, the command's
Enabled property is set to false.
A common use for this property is to be able to check some complicated context that
can't be set in the package's VSCT file.
Text property, as its name suggests, sets the command's display text. Its initial value is
which instructs the famework to use the value set in the VSCT file.