private IDataSource <CloseableReference <T> > SubmitFetchRequest <T>( IProducer <CloseableReference <T> > producerSequence, ImageRequest imageRequest, RequestLevel lowestPermittedRequestLevelOnSubmit, object callerContext) { IRequestListener requestListener = GetRequestListenerForRequest(imageRequest); try { RequestLevel lowestPermittedRequestLevel = RequestLevel.GetMax( imageRequest.LowestPermittedRequestLevel, lowestPermittedRequestLevelOnSubmit); SettableProducerContext settableProducerContext = new SettableProducerContext( imageRequest, GenerateUniqueFutureId(), requestListener, callerContext, lowestPermittedRequestLevel.Value, /* isPrefetch */ false, imageRequest.IsProgressiveRenderingEnabled || !UriUtil.IsNetworkUri(imageRequest.SourceUri), imageRequest.Priority); return(CloseableProducerToDataSourceAdapter <T> .Create( producerSequence, settableProducerContext, requestListener)); } catch (Exception exception) { return(DataSources.ImmediateFailedDataSource <CloseableReference <T> >(exception)); } }
public WWW GET(string url, Dictionary <string, string> headers, IRequestListener requestListener) { WWW www = new WWW(url, null, headers); ContinuationManager.Add(() => www.isDone, () => WaitForRequest(www, requestListener)); return(www); }
private IDataSource <object> SubmitPrefetchRequest( IProducer <object> producerSequence, ImageRequest imageRequest, RequestLevel lowestPermittedRequestLevelOnSubmit, object callerContext, int priority) { IRequestListener requestListener = GetRequestListenerForRequest(imageRequest); try { RequestLevel lowestPermittedRequestLevel = RequestLevel.GetMax( imageRequest.LowestPermittedRequestLevel, lowestPermittedRequestLevelOnSubmit); SettableProducerContext settableProducerContext = new SettableProducerContext( imageRequest, GenerateUniqueFutureId(), requestListener, callerContext, lowestPermittedRequestLevel.Value, /* isPrefetch */ true, /* isIntermediateResultExpected */ false, priority); return(ProducerToDataSourceAdapter <object> .Create( producerSequence, settableProducerContext, requestListener)); } catch (Exception exception) { return(DataSources.ImmediateFailedDataSource <object>(exception)); } }
private IEnumerator WaitForRequest(WWW www, IRequestListener requestListener) { yield return(www); // check for errors if (www.text.Contains("nginx")) { requestListener.Error("RAGE Analytics offline"); } else if (www.text.Contains("ENOTFOUND")) { requestListener.Error("SurveyManager offline"); } else { if (www.error == null && !www.text.Contains("error")) { requestListener.Result(www.text); } else { requestListener.Error(www.text); } } }
/// <summary> /// Instantiates the <see cref="ImagePipelineCore"/>. /// </summary> /// <param name="producerSequenceFactory"> /// The factory that creates all producer sequences. /// </param> /// <param name="requestListeners"> /// The listeners for the image requests. /// </param> /// <param name="isPrefetchEnabledSupplier"> /// The supplier for enabling prefetch. /// </param> /// <param name="bitmapMemoryCache"> /// The memory cache for CloseableImage. /// </param> /// <param name="encodedMemoryCache"> /// The memory cache for IPooledByteBuffer. /// </param> /// <param name="mainBufferedDiskCache"> /// The default buffered disk cache. /// </param> /// <param name="smallImageBufferedDiskCache"> /// The buffered disk cache used for small images. /// </param> /// <param name="cacheKeyFactory"> /// The factory that creates cache keys for the pipeline. /// </param> /// <param name="threadHandoffProducerQueue"> /// Move further computation to different thread. /// </param> /// <param name="flexByteArrayPool"> /// The memory pool use for BitmapImage conversion. /// </param> public ImagePipelineCore( ProducerSequenceFactory producerSequenceFactory, HashSet <IRequestListener> requestListeners, ISupplier <bool> isPrefetchEnabledSupplier, IMemoryCache <ICacheKey, CloseableImage> bitmapMemoryCache, IMemoryCache <ICacheKey, IPooledByteBuffer> encodedMemoryCache, BufferedDiskCache mainBufferedDiskCache, BufferedDiskCache smallImageBufferedDiskCache, ICacheKeyFactory cacheKeyFactory, ThreadHandoffProducerQueue threadHandoffProducerQueue, FlexByteArrayPool flexByteArrayPool) { _idCounter = 0; _producerSequenceFactory = producerSequenceFactory; _requestListener = new ForwardingRequestListener(requestListeners); _isPrefetchEnabledSupplier = isPrefetchEnabledSupplier; _bitmapMemoryCache = bitmapMemoryCache; _encodedMemoryCache = encodedMemoryCache; _mainBufferedDiskCache = mainBufferedDiskCache; _smallImageBufferedDiskCache = smallImageBufferedDiskCache; _cacheKeyFactory = cacheKeyFactory; _threadHandoffProducerQueue = threadHandoffProducerQueue; _flexByteArrayPool = flexByteArrayPool; _handleResultExecutor = Executors.NewFixedThreadPool(MAX_DATA_SOURCE_SUBSCRIBERS); }
/// <summary> /// Listens for incoming requests on a separate thread. /// </summary> public void Start() { m_logProvider.LogRuntimeInfo(ZoneFlags.Startup, "Starting WebServer"); if (Running) { throw new ApplicationException("Server is already running"); } // Initialize Virtual Path Providers var config = Configuration; if (config.VirtualPathProviders != null) { m_logProvider.LogRuntimeInfo(ZoneFlags.Startup, "Loading Virtual Path Providers"); config.VirtualPathProviders.Initialize(); } else { m_logProvider.LogRuntimeInfo(ZoneFlags.Startup, "No defined Virtual Path Providers"); } IPAddress bindAddress = config.LocalIP; int bindPort = config.Port; int connections = config.MaxConnections; m_listener = new HttpRequestListener(bindAddress, bindPort, connections, m_logProvider); m_listener.OnStateChange += new ListenerStateChange(listener_OnStateChange); m_listeningThread = new Thread(m_listener.StartListening); m_listeningThread.IsBackground = true; m_listeningThread.Start(); m_listeningThread.Name = "HttpRequestListener"; Running = true; }
public WWW GET (string url, IRequestListener requestListener) { WWW www = new WWW (url); behaviour.StartCoroutine (WaitForRequest (www, requestListener)); return www; }
public void RemoveRequestListener([NotNull] IRequestListener listener) { lock (_reqListeners) { _reqListeners.Values.Remove(listener); } }
public WWW POST(string url, WWWForm data, IRequestListener requestListener) { WWW www = new WWW(url, data); behaviour.StartCoroutine(WaitForRequest(www, requestListener)); return(www); }
public WWW GET(string url, IRequestListener requestListener) { WWW www = new WWW(url); behaviour.StartCoroutine(WaitForRequest(www, requestListener)); return(www); }
public void Initialize() { _request = ImageRequestBuilder.NewBuilderWithSource(new Uri("http://request")).Build(); _callerContext = new object(); _error = new Exception(); _immutableMap = new Dictionary <string, string>(); ProducerListenerImpl producerListener1 = new ProducerListenerImpl( (_, __) => { ++_onProducerStartFuncCalls1; }, (_, __, ___) => { ++_onProducerEventFuncCalls1; }, (_, __, ___) => { ++_onProducerFinishWithSuccessFuncCalls1; }, (_, __, ___, ____) => { ++_onProducerFinishWithFailureFuncCalls1; }, (_, __, ___) => { ++_onProducerFinishWithCancellationFuncCalls1; }, (_) => { ++_requiresExtraMapFuncCalls1; return(false); }); ProducerListenerImpl producerListener2 = new ProducerListenerImpl( (_, __) => { ++_onProducerStartFuncCalls2; }, (_, __, ___) => { ++_onProducerEventFuncCalls2; }, (_, __, ___) => { ++_onProducerFinishWithSuccessFuncCalls2; }, (_, __, ___, ____) => { ++_onProducerFinishWithFailureFuncCalls2; }, (_, __, ___) => { ++_onProducerFinishWithCancellationFuncCalls2; }, (_) => { ++_requiresExtraMapFuncCalls2; return(false); }); ProducerListenerImpl producerListener3 = new ProducerListenerImpl( (_, __) => { ++_onProducerStartFuncCalls3; }, (_, __, ___) => { ++_onProducerEventFuncCalls3; }, (_, __, ___) => { ++_onProducerFinishWithSuccessFuncCalls3; }, (_, __, ___, ____) => { ++_onProducerFinishWithFailureFuncCalls3; }, (_, __, ___) => { ++_onProducerFinishWithCancellationFuncCalls3; }, (_) => { ++_requiresExtraMapFuncCalls3; return(false); }); _requestListener1 = new RequestListenerImpl( producerListener1, (_, __, ___, ____) => { ++_onRequestStartFuncCalls1; }, (_, __, ___) => { ++_onRequestSuccessFuncCall1; }, (_, __, ___, ____) => { ++_onRequestFailureFuncCalls1; }, (_) => { ++_onRequestCancellationFuncCalls1; }); _requestListener2 = new RequestListenerImpl( producerListener2, (_, __, ___, ____) => { ++_onRequestStartFuncCalls2; }, (_, __, ___) => { ++_onRequestSuccessFuncCall2; }, (_, __, ___, ____) => { ++_onRequestFailureFuncCalls2; }, (_) => { ++_onRequestCancellationFuncCalls2; }); _requestListener3 = new RequestListenerImpl( producerListener3, (_, __, ___, ____) => { ++_onRequestStartFuncCalls3; }, (_, __, ___) => { ++_onRequestSuccessFuncCall3; }, (_, __, ___, ____) => { ++_onRequestFailureFuncCalls3; }, (_) => { ++_onRequestCancellationFuncCalls3; }); _listenerManager = new ForwardingRequestListener(new HashSet <IRequestListener> { _requestListener1, _requestListener2, _requestListener3 }); }
//--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 12JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * Issue a synchronous GET requst. * @param url Http request url. * @param inputArgs argument of for the url. * @param httpArgs extra http header. * @param listener RequestLister used to handle the sync http response. * @return the http response object. * @ any IOException. */ public static Response Get(string url, Arg[] inputArgs, Arg[] httpArgs, IRequestListener listener) { return(Sync(GET, url, inputArgs, httpArgs, listener, null)); }
private void WaitForRequest(WWW www, IRequestListener requestListener) { if (www.error == null) { requestListener.Result (www.text); } else { requestListener.Error (www.error); } }
/// <summary> /// CloseableProducerToDataSourceAdapter factory method /// </summary> public static IDataSource <CloseableReference <T> > Create( IProducer <CloseableReference <T> > producer, SettableProducerContext settableProducerContext, IRequestListener listener) { return(new CloseableProducerToDataSourceAdapter <T>( producer, settableProducerContext, listener)); }
private ProducerToDataSourceAdapter( IProducer <T> producer, SettableProducerContext settableProducerContext, IRequestListener listener) : base( producer, settableProducerContext, listener) { }
private CloseableProducerToDataSourceAdapter( IProducer <CloseableReference <T> > producer, SettableProducerContext settableProducerContext, IRequestListener listener) : base( producer, settableProducerContext, listener) { }
//--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 12JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * Issue a synchronous POST requst. * @param url Http request url. * @param inputArgs argument of for the url. * @param httpArgs extra http header. * @param listener RequestLister used to handle the sync http response. * @param multiPart message body. * @return the http response object. * @ any IOException */ public static Response Post(string url, Arg[] inputArgs, Arg[] httpArgs, IRequestListener listener, PostData multiPart) { return(Sync(POST, url, inputArgs, httpArgs, listener, multiPart)); }
public void RegisterRequestListener(IRequestListener requestListener) { if (requestListener == null) { throw new ArgumentNullException("requestListener"); } _requestListener = requestListener; }
//--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 12JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * Issue a asynchronous GET requst. * @param url Http request url. * @param inputArgs argument of for the url. * @param httpArgs extra http header. * @param listener RequestLister used to handle the async http response. * @param context message context ,wiil pass as the same in done(). */ public static void Get( string url, Arg[] inputArgs, Arg[] httpArgs, IRequestListener listener, object context) { Async(GET, url, inputArgs, httpArgs, listener, null, context); }
//--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 12JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// public ProgressInputStream(Stream stream, int total, IRequestListener listener, Object context, int notifyInterval) { this._stream = stream; this._total = total; this._listener = listener; this._context = context; this._notifyInterval = notifyInterval; _nread = 0; }
public WWW POST(string url, byte[] data, Dictionary<string,string> headers, IRequestListener requestListener) { // Force post if (data == null) { data = Encoding.UTF8.GetBytes(" "); } WWW www = new WWW (url, data, headers); ContinuationManager.Add(() => www.isDone, () => WaitForRequest (www, requestListener)); return www; }
private IEnumerator WaitForRequest (WWW www, IRequestListener requestListener) { yield return www; // check for errors if (www.error == null) { requestListener.Result(www.text); } else { Debug.LogError(www.error); requestListener.Error(www.error); } }
private void WaitForRequest(WWW www, IRequestListener requestListener) { if (www.error == null) { requestListener.Result(www.text); } else { requestListener.Error(www.error); } }
//--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 12JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * Issue an asynchronous POST requst. * @param url Http request url. * @param inputArgs argument of for the url. * @param httpArgs extra http header. * @param listener RequestLister used to handle the async http response. * @param multiPart message body. * @param context message context ,wiil pass as the same in done(). */ public static void Post( string url, Arg[] inputArgs, Arg[] httpArgs, IRequestListener listener, PostData multiPart, object context) { Async(POST, url, inputArgs, httpArgs, listener, multiPart, context); }
//--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 12JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// public ProgressInputStream(Stream stream, int total, IRequestListener listener, Object context, int notifyInterval) { this._stream = stream; this._total = total; this._listener = listener; this._context = context; this._notifyInterval = notifyInterval; _nread = 0; }
public WWW POST (string url, byte[] data, Dictionary<string,string> headers, IRequestListener requestListener) { // Force post if (data == null) { data = Encoding.UTF8.GetBytes(" "); } WWW www = new WWW (url, data, headers); behaviour.StartCoroutine (WaitForRequest (www, requestListener)); return www; }
public WWW POST(string url, byte[] data, Dictionary <string, string> headers, IRequestListener requestListener) { // Force post if (data == null) { data = Encoding.UTF8.GetBytes(" "); } WWW www = new WWW(url, data, headers); behaviour.StartCoroutine(WaitForRequest(www, requestListener)); return(www); }
public WWW POST(string url, byte[] data, Dictionary <string, string> headers, IRequestListener requestListener) { // Force post if (data == null) { data = Encoding.UTF8.GetBytes(" "); } WWW www = new WWW(url, data, headers); ContinuationManager.Add(() => www.isDone, () => WaitForRequest(www, requestListener)); return(www); }
public void AddRequestListener([NotNull] IRequestListener listener, [NotNull] string uri) { lock (_reqListeners) { if (_reqListeners.ContainsKey(uri)) { throw new ArgumentException($"A listener for {uri} has already been added."); } _reqListeners.TryAdd(uri, listener); _reqListenersLock.Reset(); } }
protected override void OnStart() { Kernel = new StandardKernel(new NinjectSettings { ActivationCacheDisabled = true }); var env = HostEnvironment.CreateDefaultEnvironment(ServiceName, InfraVersion, Arguments); Kernel.Bind <IEnvironment>().ToConstant(env).InSingletonScope(); Kernel.Bind <CurrentApplicationInfo>().ToConstant(env.ApplicationInfo).InSingletonScope(); this.PreConfigure(Kernel, Arguments); this.Configure(Kernel); Kernel.Get <SystemInitializer>().Init(); CrashHandler = Kernel.Get <ICrashHandler>(); CrashHandler.Init(OnCrash); IWorkloadMetrics workloadMetrics = Kernel.Get <IWorkloadMetrics>(); workloadMetrics.Init(); var metricsInitializer = Kernel.Get <IMetricsInitializer>(); metricsInitializer.Init(); if (PerSiloGrainType != null) { Kernel.Get <OrleansConfigurationBuilder>().GetBuilder() .ConfigureServices(service => service.AddGrainService(PerSiloGrainType).AddSingleton(typeof(IPerSiloGrain), PerSiloGrainType)); } this.PreInitialize(Kernel); this.OnInitilize(Kernel); VerifyConfigurationsIfNeeded(Kernel.Get <MicrodotHostingConfig>(), Kernel.Get <ConfigurationVerificator>()); this.Warmup(Kernel); //don't move up the get should be after all the binding are done var log = Kernel.Get <ILog>(); this.requestListener = Kernel.Get <IRequestListener>(); this.requestListener.Listen(); log.Info(_ => _("start getting traffic", unencryptedTags: new { siloName = CurrentApplicationInfo.HostName })); }
private IEnumerator WaitForRequest(WWW www, IRequestListener requestListener) { yield return(www); // check for errors if (www.error == null) { requestListener.Result(www.text); } else { Debug.LogError(www.error); requestListener.Error(www.error); } }
/// <summary> /// Instantiates the <see cref="AbstractProducerToDataSourceAdapter{T}"/>. /// </summary> protected AbstractProducerToDataSourceAdapter( IProducer <T> producer, SettableProducerContext settableProducerContext, IRequestListener requestListener) { _settableProducerContext = settableProducerContext; _requestListener = requestListener; _requestListener.OnRequestStart( _settableProducerContext.ImageRequest, _settableProducerContext.CallerContext, _settableProducerContext.Id, _settableProducerContext.IsPrefetch); producer.ProduceResults(CreateConsumer(), settableProducerContext); }
public DiagramGenerator( IConfiguration configuration, IRequestListener requestListener, INodeGraph nodeGraph) { _requestListener = requestListener; _nodeGraph = nodeGraph; _dashboardConfig = configuration.Register( "/gravity/ui/dashboards", c => { foreach (var dashboardConfiguration in c) { dashboardConfiguration.Sanitize(); } _dashboardConfigurations = c; }, new [] { new DashboardConfiguration() }); }
public GameViewModel(IRequestListener requestListener) : base(requestListener) { Players = new ObservableCollection<PlayerViewModel>() { new PlayerViewModel() { Name = "Benas", Money = 10000, CurrentBet = 20, Cards = new ObservableCollection<StandartCard>() { new StandartCard(Suit.Clubs, Rank.Four), new StandartCard(Suit.Hearths, Rank.Nine) } } }; Players.CollectionChanged += (sender, args) => { base.NotifyPropertyChanged("Player1"); base.NotifyPropertyChanged("Player2"); base.NotifyPropertyChanged("Player3"); base.NotifyPropertyChanged("Player4"); base.NotifyPropertyChanged("Player5"); base.NotifyPropertyChanged("Player6"); base.NotifyPropertyChanged("Player7"); base.NotifyPropertyChanged("Player8"); }; DealerCards = new ObservableCollection<StandartCard> { new StandartCard(Suit.Hearths, Rank.Ace), new StandartCard(Suit.Hearths, Rank.King), new StandartCard(Suit.Hearths, Rank.Queen), new StandartCard(Suit.Hearths, Rank.Valet), new StandartCard(Suit.Hearths, Rank.Ten) }; Pot = 300; }
private static Response Sync( string method, string url, Arg[] inputArgs, Arg[] httpArgs, IRequestListener listener, PostData multiPart) { var request = new Request { _method = method, _url = url, _httpArgs = httpArgs, _inputArgs = inputArgs, _multiPart = multiPart, _listener = listener }; var response = new Response(); request.DoHTTP(response); return(response); }
public void SendRequest(IMessage request, double timeout, IRequestListener listener) { if (!IsConnected()) { throw new Exception("not connected"); } JsonObject envelope = new JsonObject(); // synchronized to ensure message sequence numbers are ordered lock (writeLock) { long seqNum = Interlocked.Increment(ref messageIdGenerator); envelope.Add(ProtocolConstants.OP_FIELD, ProtocolOpConstants.OP_REQUEST); envelope.Add(ProtocolConstants.SEQ_NUM_FIELD, seqNum); envelope.Add(ProtocolConstants.BODY_FIELD, ((JSONMessage)request)._rawData()); SendRequestContext ctx = new SendRequestContext(seqNum, envelope.ToString(), request, listener); if (protocol < 1) { throw new NotSupportedException("send request is not supported with this server"); } if (maxMessageSize > 0 && ctx.GetJson().Length > maxMessageSize) { throw new Exception("maximum message size exceeded"); } ctx.SetTimeout(timeout, new TimerCallback(requestTimeout)); requests.Put(seqNum, ctx); Queue(ctx); } }
private static void Async( string method, string url, Arg[] inputArgs, Arg[] httpArgs, IRequestListener listener, PostData multiPart, object context) { var request = new Request { _method = method, _context = context, _listener = listener, _url = url, _httpArgs = httpArgs, _inputArgs = inputArgs, _multiPart = multiPart }; //strategies request._thread = new Thread(request.Run); request._thread.Start(); }
public RequestCommand(BindableBase vm, IRequestListener listener) { this.vm = vm; this.listener = listener; }
private static Response Sync( string method, string url, Arg[] inputArgs, Arg[] httpArgs, IRequestListener listener, PostData multiPart) { var request = new Request { _method = method, _url = url, _httpArgs = httpArgs, _inputArgs = inputArgs, _multiPart = multiPart, _listener = listener }; var response = new Response(); request.DoHTTP(response); return response; }
private static void Async( string method, string url, Arg[] inputArgs, Arg[] httpArgs, IRequestListener listener, PostData multiPart, object context) { var request = new Request { _method = method, _context = context, _listener = listener, _url = url, _httpArgs = httpArgs, _inputArgs = inputArgs, _multiPart = multiPart }; //strategies request._thread = new Thread(request.Run); request._thread.Start(); }
//--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 12JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * Issue an asynchronous POST requst. * @param url Http request url. * @param inputArgs argument of for the url. * @param httpArgs extra http header. * @param listener RequestLister used to handle the async http response. * @param multiPart message body. * @param context message context ,wiil pass as the same in done(). */ public static void Post( string url, Arg[] inputArgs, Arg[] httpArgs, IRequestListener listener, PostData multiPart, object context) { Async(POST, url, inputArgs, httpArgs, listener, multiPart, context); }
//--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 12JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * Issue a synchronous POST requst. * @param url Http request url. * @param inputArgs argument of for the url. * @param httpArgs extra http header. * @param listener RequestLister used to handle the sync http response. * @param multiPart message body. * @return the http response object. * @ any IOException */ public static Response Post(string url, Arg[] inputArgs, Arg[] httpArgs, IRequestListener listener, PostData multiPart) { return Sync(POST, url, inputArgs, httpArgs, listener, multiPart); }
//--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 12JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * Issue a asynchronous GET requst. * @param url Http request url. * @param inputArgs argument of for the url. * @param httpArgs extra http header. * @param listener RequestLister used to handle the async http response. * @param context message context ,wiil pass as the same in done(). */ public static void Get( string url, Arg[] inputArgs, Arg[] httpArgs, IRequestListener listener, object context) { Async(GET, url, inputArgs, httpArgs, listener, null, context); }
//--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 12JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * Issue a synchronous GET requst. * @param url Http request url. * @param inputArgs argument of for the url. * @param httpArgs extra http header. * @param listener RequestLister used to handle the sync http response. * @return the http response object. * @ any IOException. */ public static Response Get(string url, Arg[] inputArgs, Arg[] httpArgs, IRequestListener listener) { return Sync(GET, url, inputArgs, httpArgs, listener, null); }
public WWW GET(string url, Dictionary<string,string> headers, IRequestListener requestListener) { WWW www = new WWW (url,null,headers); ContinuationManager.Add(() => www.isDone, () => WaitForRequest (www, requestListener)); return www; }
public BindableViewModel(IRequestListener requestListener) { if (requestListener != null) Request = new RequestCommand(this, requestListener); }