private static CapabilityList GetCapabilityList(CommandMapper commandMapper, SnapshotDiff diff)
{
var capabilities = new CapabilityList {
OS = OS.Windows
};
string appName = null, appDescription = null;
diff.CollectFileTypes(commandMapper, capabilities);
diff.CollectContextMenus(commandMapper, capabilities);
diff.CollectAutoPlays(commandMapper, capabilities);
diff.CollectDefaultPrograms(commandMapper, capabilities, ref appName);
var appRegistration = diff.GetAppRegistration(commandMapper, capabilities, ref appName, ref appDescription);
if (appRegistration != null)
{
capabilities.Entries.Add(appRegistration);
}
else
{ // Only collect URL protocols if there wasn't already an application registration that covered them
diff.CollectProtocolAssocs(commandMapper, capabilities);
}
return(capabilities);
}