/// <summary> /// Insert element. /// </summary> /// <typeparam name="TType">Codegen configuration type.</typeparam> /// <typeparam name="TProxy">Codegen proxy.</typeparam> /// <param name="componentConfig"></param> public void UpdateConfig <TType, TProxy>(ComponentConfig <TType, TProxy> componentConfig) where TType : ICodegenType, new() where TProxy : ICodegenProxy <TType, TProxy>, new() { uint slotIndex = 0; SharedConfig <TProxy> sharedConfig = MlosProxyInternal.SharedConfigDictionaryLookup <ProbingPolicy> .Get <TProxy>(SharedConfigDictionary, componentConfig.Config, ref slotIndex); if (sharedConfig.Buffer == IntPtr.Zero) { throw new KeyNotFoundException("Unable to locate config"); } componentConfig.Config.Update(sharedConfig.Config); }
/// <summary> /// Insert element. /// </summary> /// <typeparam name="TType">Codegen configuration type.</typeparam> /// <typeparam name="TProxy">Codegen proxy.</typeparam> /// <param name="componentConfig"></param> public void UpdateConfig <TType, TProxy>(ComponentConfig <TType, TProxy> componentConfig) where TType : ICodegenType, new() where TProxy : ICodegenProxy <TType, TProxy>, new() { uint slotIndex = 0; SharedConfig <TProxy> sharedConfig = sharedConfigMemoryRegion.Get <ProbingPolicy, TProxy>(componentConfig.Config, ref slotIndex); if (sharedConfig.Buffer == IntPtr.Zero) { throw new KeyNotFoundException("Unable to locate config"); } componentConfig.Config.Update(sharedConfig.Config); }
/// <summary> /// Insert element. /// </summary> /// <typeparam name="TType">Codegen configuration type.</typeparam> /// <typeparam name="TProxy">Codegen proxy.</typeparam> /// <param name="componentConfig"></param> internal void Insert <TType, TProxy>(ComponentConfig <TType, TProxy> componentConfig) where TType : ICodegenType, new() where TProxy : ICodegenProxy <TType, TProxy>, new() { MlosProxyInternal.SharedConfigDictionaryLookup <ProbingPolicy> .Add <TType, TProxy>(SharedConfigDictionary, componentConfig); }
/// <summary> /// Insert element. /// </summary> /// <typeparam name="TType">Codegen configuration type.</typeparam> /// <typeparam name="TProxy">Codegen proxy.</typeparam> /// <param name="componentConfig"></param> internal void Insert <TType, TProxy>(ComponentConfig <TType, TProxy> componentConfig) where TType : ICodegenType, new() where TProxy : ICodegenProxy <TType, TProxy>, new() { sharedConfigMemoryRegion.Add <ProbingPolicy, TType, TProxy>(componentConfig); }