If I understand you correctly you want to pass in a list of IData but only call UpdateComponentProperties for items of type IDragAndDropObjectData. Here are some possible approaches:
Filter by type and forget about all the other items:
private void DoActualDragAndDropOperation(List<IData> dataList)
{
foreach (var data in dataList.OfType<IDragAndDropObjectData>())
{
UpdateComponentProperties(data);
}
}
If you want to perform action on the other items, check them one by one:
private void DoActualDragAndDropOperation(List<IData> dataList)
{
foreach (var data in dataList)
{
var dragAndDropData = data as IDragAndDropObjectData;
if (dragAndDropData != null)
{
UpdateComponentProperties(dragAndDropData);
}
else
{
}
}
}