fix crash on multiple write declarations
parent
fa9000590b
commit
dd22c00072
|
@ -31,11 +31,11 @@ namespace Encompass
|
|||
sendTypes.UnionWith(activatesAttribute.writePendingTypes);
|
||||
}
|
||||
|
||||
var writesAttribute = GetType().GetCustomAttribute<Writes>(false);
|
||||
if (writesAttribute != null)
|
||||
var writesAttributes = GetType().GetCustomAttributes<Writes>(false);
|
||||
foreach (var writesAttribute in writesAttributes)
|
||||
{
|
||||
sendTypes.UnionWith(writesAttribute.writeTypes);
|
||||
writePriorities = writesAttribute.priorities;
|
||||
writePriorities = new Dictionary<Type, int>[2] { writePriorities, writesAttribute.priorities }.SelectMany(dict => dict).ToDictionary(pair => pair.Key, pair => pair.Value);
|
||||
}
|
||||
|
||||
var receivesAttribute = GetType().GetCustomAttribute<Receives>(false);
|
||||
|
|
Loading…
Reference in New Issue