public void SetStacks(params string[] canonicalNames)
{
if (canonicalNames == null) throw new ArgumentNullException("canonicalNames");
var propertyKeyList = new List<PROPERTYKEY>();
foreach (string prop in canonicalNames)
{
// Get the PropertyKey using the canonicalName passed in
PROPERTYKEY propKey;
int result = PropertySystemNativeMethods.PSGetPropertyKeyFromName(prop, out propKey);
if (result == 0) throw new ArgumentException("", "canonicalNames", Marshal.GetExceptionForHR(result));
propertyKeyList.Add(propKey);
}
if (propertyKeyList.Any())
{
SetStacks(propertyKeyList.ToArray());
}
}