Game Development Reference
In-Depth Information
catch (Exception e)
Standalone shell extensions exist as separate assemblies. This is ideal for extensions
that contain the actual tool logic, or for extensions that cannot be integrated into
the source code of an existing tool.
Sample Usage—Integrated
If you are able to modify the source code to your tool and if it is managed code,
you can integrate the shell extension right into the code base. There are a number
of benefits to this approach, but the most important is ease of deployment.
To start, we generally want to keep the logic called by the extension and the logic
called by the tool in the same location for maintainability. The following code imple-
ments a simple class that processes a collection of files using a specified command.
public static class SimpleTool
public static void ProcessFiles(string command,
string[] files,
bool fromExtension)
if (fromExtension)
StringBuilder buffer = new StringBuilder();
buffer.AppendLine(String.Format(“Handle Command '{0}':”, command));
foreach (string file in files)
Search Nedrilad ::

Custom Search