Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Made ServiceClientBase method calls virtual

  • Loading branch information...
commit f822df66e610fce5634e7d6cc0ee26fc23c6394b 1 parent 85e6237
Justin Pihony authored April 12, 2012
26  src/ServiceStack.Common/ServiceClient.Web/ServiceClientBase.cs
@@ -520,40 +520,40 @@ private void DownloadBytes(string requestUri, object request, Action<byte[]> cal
520 520
 		}
521 521
 #endif
522 522
 
523  
-        public void SendOneWay(object request)
  523
+        public virtual void SendOneWay(object request)
524 524
         {
525 525
             var requestUri = this.AsyncOneWayBaseUri.WithTrailingSlash() + request.GetType().Name;
526 526
             DownloadBytes(requestUri, request);
527 527
         }
528 528
 
529  
-        public void SendOneWay(string relativeOrAbsoluteUrl, object request)
  529
+        public virtual void SendOneWay(string relativeOrAbsoluteUrl, object request)
530 530
         {
531 531
             var requestUri = GetUrl(relativeOrAbsoluteUrl);
532 532
             DownloadBytes(requestUri, request);
533 533
         }
534 534
 
535  
-        public void SendAsync<TResponse>(object request, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
  535
+        public virtual void SendAsync<TResponse>(object request, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
536 536
         {
537 537
             var requestUri = this.SyncReplyBaseUri.WithTrailingSlash() + request.GetType().Name;
538 538
             asyncClient.SendAsync(Web.HttpMethod.Post, requestUri, request, onSuccess, onError);
539 539
         }
540 540
 
541  
-        public void GetAsync<TResponse>(string relativeOrAbsoluteUrl, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
  541
+        public virtual void GetAsync<TResponse>(string relativeOrAbsoluteUrl, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
542 542
         {
543 543
             asyncClient.SendAsync(Web.HttpMethod.Get, GetUrl(relativeOrAbsoluteUrl), null, onSuccess, onError);
544 544
         }
545 545
 
546  
-        public void DeleteAsync<TResponse>(string relativeOrAbsoluteUrl, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
  546
+        public virtual void DeleteAsync<TResponse>(string relativeOrAbsoluteUrl, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
547 547
         {
548 548
             asyncClient.SendAsync(Web.HttpMethod.Delete, GetUrl(relativeOrAbsoluteUrl), null, onSuccess, onError);
549 549
         }
550 550
 
551  
-        public void PostAsync<TResponse>(string relativeOrAbsoluteUrl, object request, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
  551
+        public virtual void PostAsync<TResponse>(string relativeOrAbsoluteUrl, object request, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
552 552
         {
553 553
             asyncClient.SendAsync(Web.HttpMethod.Post, GetUrl(relativeOrAbsoluteUrl), request, onSuccess, onError);
554 554
         }
555 555
 
556  
-        public void PutAsync<TResponse>(string relativeOrAbsoluteUrl, object request, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
  556
+        public virtual void PutAsync<TResponse>(string relativeOrAbsoluteUrl, object request, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
557 557
         {
558 558
             asyncClient.SendAsync(Web.HttpMethod.Put, GetUrl(relativeOrAbsoluteUrl), request, onSuccess, onError);
559 559
         }
@@ -587,27 +587,27 @@ public virtual TResponse Send<TResponse>(string httpMethod, string relativeOrAbs
587 587
             }
588 588
         }
589 589
 
590  
-        public TResponse Get<TResponse>(string relativeOrAbsoluteUrl)
  590
+        public virtual TResponse Get<TResponse>(string relativeOrAbsoluteUrl)
591 591
         {
592 592
             return Send<TResponse>(Web.HttpMethod.Get, relativeOrAbsoluteUrl, null);
593 593
         }
594 594
 
595  
-        public TResponse Delete<TResponse>(string relativeOrAbsoluteUrl)
  595
+        public virtual TResponse Delete<TResponse>(string relativeOrAbsoluteUrl)
596 596
         {
597 597
             return Send<TResponse>(Web.HttpMethod.Delete, relativeOrAbsoluteUrl, null);
598 598
         }
599 599
 
600  
-        public TResponse Post<TResponse>(string relativeOrAbsoluteUrl, object request)
  600
+        public virtual TResponse Post<TResponse>(string relativeOrAbsoluteUrl, object request)
601 601
         {
602 602
             return Send<TResponse>(Web.HttpMethod.Post, relativeOrAbsoluteUrl, request);
603 603
         }
604 604
 
605  
-        public TResponse Put<TResponse>(string relativeOrAbsoluteUrl, object request)
  605
+        public virtual TResponse Put<TResponse>(string relativeOrAbsoluteUrl, object request)
606 606
         {
607 607
             return Send<TResponse>(Web.HttpMethod.Put, relativeOrAbsoluteUrl, request);
608 608
         }
609 609
 
610  
-        public TResponse PostFile<TResponse>(string relativeOrAbsoluteUrl, FileInfo fileToUpload, string mimeType)
  610
+        public virtual TResponse PostFile<TResponse>(string relativeOrAbsoluteUrl, FileInfo fileToUpload, string mimeType)
611 611
         {
612 612
             var requestUri = GetUrl(relativeOrAbsoluteUrl);
613 613
             var webRequest = (HttpWebRequest)WebRequest.Create(requestUri);
@@ -634,7 +634,7 @@ public TResponse PostFile<TResponse>(string relativeOrAbsoluteUrl, FileInfo file
634 634
             }
635 635
         }
636 636
 
637  
-        public TResponse PostFile<TResponse>(string relativeOrAbsoluteUrl, Stream fileToUpload, string fileName, string mimeType)
  637
+        public virtual TResponse PostFile<TResponse>(string relativeOrAbsoluteUrl, Stream fileToUpload, string fileName, string mimeType)
638 638
         {
639 639
             var requestUri = GetUrl(relativeOrAbsoluteUrl);
640 640
             var webRequest = (HttpWebRequest)WebRequest.Create(requestUri);

0 notes on commit f822df6

Please sign in to comment.
Something went wrong with that request. Please try again.