private void AddSkipRuleResultEventHandler(object sender, DeploymentTraceEventArgs traceEvent)
{
DeploymentSkipDirectiveEventArgs skipArgs = traceEvent as DeploymentSkipDirectiveEventArgs;
if (skipArgs != null)
{
string path = skipArgs.AbsolutePath;
bool isDirectory = FileHelper.FileSystem.Directory.Exists(path);
string basePath = Environment.Instance.ContentPath;
if (path != null && path.Length > basePath.Length)
{
// Removing the base filesystem content path so that people
// don't try to build expressions based off of that path in case
// it changes later.
path = path.Remove(0, basePath.Length);
}
if (isDirectory)
{
path = "Directory: " + path;
}
else
{
path = "File: " + path;
}
_skipRulesTestResults.Add(path);
}
}