コード例 #1
0
		public virtual void  TestDefaultValueWithoutSetting()
		{
			// LUCENE-1805: make sure default get returns null,
			// twice in a row
			CloseableThreadLocal ctl = new CloseableThreadLocal();
			Assert.IsNull(ctl.Get());
			Assert.IsNull(ctl.Get());
		}
コード例 #2
0
		public virtual void  TestNullValue()
		{
			// Tests that null can be set as a valid value (LUCENE-1805). This
			// previously failed in get().
			CloseableThreadLocal ctl = new CloseableThreadLocal();
			ctl.Set((System.Object) null);
			Assert.IsNull(ctl.Get());
		}
コード例 #3
0
        public virtual void  TestDefaultValueWithoutSetting()
        {
            // LUCENE-1805: make sure default get returns null,
            // twice in a row
            CloseableThreadLocal <object> ctl = new CloseableThreadLocal <object>();

            Assert.IsNull(ctl.Get());
            Assert.IsNull(ctl.Get());
        }
コード例 #4
0
        public virtual void  TestNullValue()
        {
            // Tests that null can be set as a valid value (LUCENE-1805). This
            // previously failed in get().
            CloseableThreadLocal <object> ctl = new CloseableThreadLocal <object>();

            ctl.Set(null);
            Assert.IsNull(ctl.Get());
        }
コード例 #5
0
ファイル: Analyzer.cs プロジェクト: jhuntsman/FlexNet
		/// <summary>   
        ///     Frees persistent resources used by the <see cref="Analyzer"/>.
        /// </summary>
        /// <remarks>
        ///     <para>
        ///         The default implementation closes the internal <see cref="TokenStream"/>s 
        ///         used by the analyzer.
        ///     </para>
        /// </remarks>
		public virtual void  Close()
		{
			if(tokenStreams!=null) tokenStreams.Close();
			tokenStreams = null;
		}