                lock ({{ trait_pascal }}Bridge._registryLock)
                {
                    {{ trait_pascal }}Bridge._bridgeRegistry[bridge._bridgeId] = bridge;
                }
                var bridgeHandle = NativeMethods.HtmVisitorCreate(bridge._vtable);
