static Collection<Exception> ProcessVariableData(PropertyInfo[] propertyList, object obj, Stream sourceData, int index, bool[] IncludedFields)
{
int position = index;
Collection<Exception> errors = new Collection<Exception>();
if (propertyList != null && obj != null && sourceData != null && IncludedFields != null)
{
using (MemoryStream dataStream = sourceData.GetMemoryStream(index))
{
dataStream.Position = 0;
for (int i = 0; i < IncludedFields.Length; i++)
{
if (IncludedFields[i])
{
try
{
position += Utility.LoadProperty(obj, dataStream, propertyList[i], errors);
}
catch (Exception ex)
{
errors.Add(ex);
}
}
}
}
}
return errors;
}