示例#1
0
 public void Dispose()
 {
     if (mSpeechEnroller != null)
     {
         mSpeechEnroller.Dispose();
         mSpeechEnroller = null;
     }
 }
示例#2
0
 public SpeechEnroller(SpeechApi.Configuration configuration)
 {
     if (configuration.ServerTransport != SpeechApi.SpeechTransport.Rest)
     {
         throw new NotSupportedException("ServerTransport not supported");
     }
     else if (configuration.ServerVersion == SpeechApi.SpeechVersion.Version_1)
     {
         if (configuration.ServerTransportObject is HttpClient)
         {
             mSpeechEnroller = new Internal.SpeechEnroller_HttpClient_Version1(configuration);
         }
         else
         {
             throw new NotSupportedException("ServerTransport not supported");
         }
     }
     else
     {
         throw new NotSupportedException("ServerVersion not supported");
     }
 }