示例#1
0
        /// <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);
        }
示例#2
0
        /// <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);
        }
示例#3
0
 /// <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);
 }
示例#4
0
 /// <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);
 }