Exemplo n.º 1
0
 public void RTMAdapter_init(Dictionary <string, string> specs, RTCFactoryMethod factory)
 {
     foreach (var spec in specs)
     {
         Manager_setRTMAdapterSpec(_m, Encoding.ASCII.GetBytes(spec.Key), Encoding.ASCII.GetBytes(spec.Value));
     }
     Manager_RTMAdapter_init(_m);
     factoryDictionary[specs["implementation_id"]] = factory;
 }
Exemplo n.º 2
0
 public RTC.RTComponent createComponent(string identifier)
 {
     try
     {
         RTCFactoryMethod factory = factoryDictionary[identifier];
         RTC_t            rtc     = Manager_createComponent(_m, identifier);
         RTComponent      r       = factory(rtc);
         r.initialize();
         return(r);
     }
     catch (KeyNotFoundException ex)
     {
         System.Console.Write("Loading RTComponent (" + identifier + ") failed. Reason: Key Not Found.");
         return(null);
     }
 }