Beispiel #1
0
        NotepadLoggerProvider()
        {
            var poolProvider = new DefaultObjectPoolProvider();

            stringBuilderPool = poolProvider.CreateStringBuilderPool();
            windowFinder      = new WindowFinder();
        }
Beispiel #2
0
        public JStringBuilder(int initCapacity, int maxCapacity)
        {
            var objectPoolProvider = new DefaultObjectPoolProvider();

            _stringBuilderPool = objectPoolProvider.CreateStringBuilderPool(initCapacity, maxCapacity);
            _stringBuilder     = _stringBuilderPool.Get();
        }
Beispiel #3
0
        public JStringBuilder(int capacity)
        {
            var objectPoolProvider = new DefaultObjectPoolProvider();

            _stringBuilderPool = objectPoolProvider.CreateStringBuilderPool(capacity, capacity * 2);
            _stringBuilder     = _stringBuilderPool.Get();
        }
Beispiel #4
0
        public JStringBuilder()
        {
            var objectPoolProvider = new DefaultObjectPoolProvider();

            _stringBuilderPool = objectPoolProvider.CreateStringBuilderPool();
            _stringBuilder     = _stringBuilderPool.Get();
        }
 internal HttpListenerResponse(HttpListenerContext context, System.Net.HttpListenerContext inner)
 {
     this.context = context;
     this.inner   = inner.Response;
     this.Body    = this.inner.OutputStream;
     this.headers = new ResponseHeaderWrapper(inner);
     this.cookies = new ResponseCookies(this.headers, pool.CreateStringBuilderPool());
 }
Beispiel #6
0
        /// <summary>
        /// Loads the module
        /// </summary>
        /// <param name="bootstrapper">Bootstrapper to register with</param>
        public void Load(IBootstrapper?bootstrapper)
        {
            var objectPoolProvider = new DefaultObjectPoolProvider();

            bootstrapper?.Register(typeof(GenericComparer <>), ServiceLifetime.Singleton)
            .Register(typeof(GenericEqualityComparer <>), ServiceLifetime.Singleton)
            .Register(new DynamoTypes(), ServiceLifetime.Singleton)
            .Register(objectPoolProvider.CreateStringBuilderPool(), ServiceLifetime.Singleton);
        }
        public void Setup()
        {
            var objectPoolProvider = new DefaultObjectPoolProvider();

            StringBuilderPool = objectPoolProvider.CreateStringBuilderPool();
            for (var x = 0; x < char.MaxValue; ++x)
            {
                Value += (char)x + " ";
            }
        }
        static JsonValidator()
        {
            var objectPoolProvider = new DefaultObjectPoolProvider();

            StringBuilderPool = objectPoolProvider.CreateStringBuilderPool();

            var accessor   = new ResourceAccessor(Assembly.GetExecutingAssembly());
            var libManager = new LibraryManager(
                Assembly.GetExecutingAssembly(),
                new LibraryItem(Platform.Windows, Bitness.x64,
                                new LibraryFile("nlohmann_json_schema_validator.dll",
                                                accessor.Binary("nlohmann_json_schema_validator.dll"))),
                new LibraryItem(Platform.Linux, Bitness.x64,
                                new LibraryFile("libnlohmann_json_schema_validator.so",
                                                accessor.Binary("libnlohmann_json_schema_validator.so"))));

            libManager.LoadNativeLibrary();
        }
        public void Setup()
        {
            var objectPoolProvider = new DefaultObjectPoolProvider();

            StringBuilderPool = objectPoolProvider.CreateStringBuilderPool();
        }
Beispiel #10
0
            public Encoder()
            {
                var objectPoolProvider = new DefaultObjectPoolProvider();

                stringBuilderPool = objectPoolProvider.CreateStringBuilderPool();
            }
Beispiel #11
0
            private static ObjectPool <StringBuilder> CreateStringBuilderPool()
            {
                var objectPoolProvider = new DefaultObjectPoolProvider();

                return(objectPoolProvider.CreateStringBuilderPool());
            }