mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2026-10-24 03:50:57 +00:00
RegisterDynamicTypeDef fall back
This commit is contained in:
1 parent
3e608ef1d1
commit
f14dc633ae
6 files changed
+167
-4
No files matched your search
@@ -1375,7 +1375,18 @@ public class Warehouse
|
||||
}
|
||||
|
||||
if (_remoteTypeDefs[domain].ContainsKey(typeDef.Id))
|
||||
{
|
||||
// Remote definitions are scoped by domain and survive an
|
||||
// EpConnection reconnect in the Warehouse cache. A freshly
|
||||
// parsed definition for that same remote id must inherit the
|
||||
// Warehouse-local id of the cached definition. Leaving it at
|
||||
// zero makes Instance.RegisterDynamicTypeDef fall back to the
|
||||
// producer's wire id, which can collide with an unrelated
|
||||
// local CLR definition.
|
||||
var existing = _remoteTypeDefs[domain][typeDef.Id];
|
||||
typeDef.LocalTypeDefId = existing.LocalTypeDefId;
|
||||
return false;
|
||||
}
|
||||
|
||||
// @TODO: Try to find a proxy type for the remote type def, if not found, create a new proxy type and register it in the warehouse.
|
||||
_remoteTypeDefs[domain][typeDef.Id] = typeDef;
|
||||
|
||||
Reference in new issue
Block a user