Created
February 16, 2020 02:40
-
-
Save CarterTsai/f9fd74812029ae529c4c9aee17dd9452 to your computer and use it in GitHub Desktop.
aop using
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace aoptest | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var decoratedAPI = LoggerDecorator<IHttpApi>.Create(new HttpApi()); | |
decoratedAPI.Get("https://www.google.com"); | |
decoratedAPI.Post("https://www.google.com", new {ProductID = "A123456", ProductName = "Test"}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment