private ObjectGroupObjectData FindByExGuid(List<ObjectGroupDataElementData> objectGroupList, ExGuid extendedGuid, out ObjectGroupObjectDeclare declare)
{
foreach (ObjectGroupDataElementData objectGroup in objectGroupList)
{
int findIndex = objectGroup.ObjectGroupDeclarations.ObjectDeclarationList.FindIndex(objDeclare => objDeclare.ObjectExtendedGUID.Equals(extendedGuid));
if (findIndex == -1)
{
continue;
}
declare = objectGroup.ObjectGroupDeclarations.ObjectDeclarationList[findIndex];
return objectGroup.ObjectGroupData.ObjectGroupObjectDataList[findIndex];
}
throw new InvalidOperationException("Cannot find the " + extendedGuid.GUID.ToString());
}
}