CK.WordPredictor.TextualContextService.SetRawText C# (CSharp) Méthode

SetRawText() public méthode

public SetRawText ( string value ) : void
value string
Résultat void
        public void SetRawText( string value )
        {
            using( new ChangeWrapper( this ) )
            {
                if( value == _rawContext ) return;

                InternalSetRawText( value );
            }
        }

Usage Example

        public void WordPredictorServiceTest()
        {
            TextualContextService t = new TextualContextService();

            WordPredictorServiceBase.PluginDirectoryPath = TestHelper.SybilleResourceFullPath;
            WordPredictorServiceBase w = new SybilleWordPredictorService()
            {
                Feature = TestHelper.MockFeature( 10 ).Object,
                TextualContextService = t
            };

            w.Setup( null );
            w.Start();

            Task.WaitAll( w.AsyncEngineContinuation );

            t.SetRawText( "Je" );
            //Task.WaitAll( w.AsyncEngineContinuation );
            Assert.That( w.Words.Count > 0 );
            Console.WriteLine( String.Join( " ", w.Words.Select( o => o.Word ).ToArray() ) );
            t.SetRawText( "Je " );
            t.SetRawText( "Je Bon" );
            Assert.That( w.Words.Count > 0 );
            Console.WriteLine( String.Join( " ", w.Words.Select( o => o.Word ).ToArray() ) );

            w.Stop();
        }
All Usage Examples Of CK.WordPredictor.TextualContextService::SetRawText