static void ProcessRequest(Type type, PropertyBagPreparationOptions options)
        {
            var visitor = s_PropertyBagRequestVisitorPool.Get();

            try
            {
                visitor.Options = options;
                RequestPropertyBagGeneration(visitor, type);
            }
            finally
            {
                s_PropertyBagRequestVisitorPool.Release(visitor);
            }
        }
        /// <summary>
        /// Helper method to generate a reflected property bag ahead of time.
        /// </summary>
        /// <param name="type">The type for which we request a  property bag generation.</param>
        /// <param name="options">Options detailing how the generation should be handled.</param>
        public static void RequestPropertyBagGeneration(Type type, PropertyBagPreparationOptions options = default)
        {
            // If no provider exists, queue anyway to give a chance to the registration of the reflection provider
            if (options.Async || !PropertyBagStore.HasProvider)
            {
                if (s_RequestQueue.IsEmpty)
                {
                    EditorApplication.update += s_ProcessQueueFunction;
                }

                s_RequestQueue.Enqueue(new TypeOption {
                    Type = type, Options = options
                });
                return;
            }

            ProcessRequest(type, options);
        }
 /// <summary>
 /// Helper method to generate a reflected property bag ahead of time.
 /// </summary>
 /// <param name="options">Options detailing how the generation should be handled.</param>
 /// <typeparam name="TContainer">The type for which we request a  property bag generation.</typeparam>
 public static void RequestPropertyBagGeneration <TContainer>(PropertyBagPreparationOptions options = default)
 {
     RequestPropertyBagGeneration(typeof(TContainer), options);
 }
 public void Reset()
 {
     Options = default;
 }