Giter Club home page Giter Club logo

netcore.aspectcore.aop.demo's Introduction

NetCore.AspectCore.AOP.Demo

這個專案專注於利用 AspectCore 實作 AOP 機制。
This project focus on the use of AspectCore to implement AOP mechanism.

練習套用 AspectCore 實作 AOP 機制於 .NET Core 3.1 上。
To practice how AOP mechanism with AspectCore implement on .NET Core 3.1.

運行專案

假如你想要直接測試應用程式,可以使用 Postman 或其他一些用於模擬 Client-side 行為的應用程式。

If you want to interactively test the application, you can use Postman or any other Http client.

透過 Visual Studio 2019 或者利用 dotnet run 指令先把專案跑起來。

  1. Run the project from Visual Studio 2019 or by typing dotnet run in a command window

透過 Postman 製作一個如下所示之 GET 要求

  1. Launch Postman and make a GET request as follows:
    GET https://localhost:5001/customexecutexxxx HTTP/1.1
    cache-control: no-cache
    Accept: */*
    Host: localhost:5001
    accept-encoding: gzip, deflate, br
    Connection: keep-alive

便會得到以下回應:

returns the following response:

CustomService.ExecuteXXXX method executed via serviceaop.

製作另一個如下所示之 GET 要求

  1. Then make another a GET request like the following:
    GET https://localhost:5001/otherexecutexxxx HTTP/1.1
    cache-control: no-cache
    Accept: */*
    Host: localhost:5001
    accept-encoding: gzip, deflate, br
    Connection: keep-alive

便會得到以下回應:

returns the following response:

OtherService.ExecuteXXXX method executed.

總結來說,第一個被執行的方法被 ServiceAop 抓到,而第二個被執行的方法則不會被 ServiceAop 抓到。

  1. To sum up, first one executed method can catched by serviceaop, second one executed method can't catched by serviceaop.

最後版本

1.0.0.0 (March 19, 2020)

記錄

  • 1.0.0.0
    • Initial Commit (初次上版)

參考 github

AspectCore-Framework by dotnetcore

參考文章

netcore.aspectcore.aop.demo's People

Contributors

cdcd72 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.