public SyncInterface GetService <AsyncInterface, SyncInterface>(params ISecurityScope[] securityScopes) where AsyncInterface : class, ICommunicationObject where SyncInterface : class { AsyncInterface service = BeanContext.GetService <IServiceFactory>().GetService <AsyncInterface>(securityScopes); SyncCallInterceptor synchronizedInterceptor = BeanContext.RegisterBean <SyncCallInterceptor>().PropertyValue("AsyncService", service).PropertyValue("AsyncServiceInterface", typeof(AsyncInterface)).Finish(); return((SyncInterface)ProxyFactory.CreateProxy(typeof(SyncInterface), synchronizedInterceptor)); }
internal Interface( string iface, string apiKey ) { Timeout = 1000 * 100; // 100 sec asyncInterface = new AsyncInterface( iface, apiKey ); }
internal Interface( string iface, string apiKey ) { asyncInterface = new AsyncInterface( iface, apiKey ); }