Skip to content

Commit

Permalink
Merge pull request #579 from samcarrier/patch-1
Browse files Browse the repository at this point in the history
Update Architecture.md
  • Loading branch information
jamesmontemagno committed Dec 14, 2023
2 parents 9d4a1f0 + 9a6c310 commit 4c4e2d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
I get a lot of questions about architecture and how to unit tests plugins. So here are some things to be aware of for any plugin that I publish.

### What's with this .Current Global Variable? Why can't I use $FAVORITE_IOC_LIBARY
You totally can! Every plugin I create is based on an interface. The static singleton just gives you a super simple way of gaining access to the platform implementation. Realize that the implementation of the plugin lives in your iOS, Android, Windows, etc. Thies means you will need to register it there by instantiating a `Cross___Implementation` from the platform specific projects.
You totally can! Every plugin I create is based on an interface. The static singleton just gives you a super simple way of gaining access to the platform implementation. Realize that the implementation of the plugin lives in your iOS, Android, Windows, etc. This means you will need to register it there by instantiating a `Cross___Implementation` from the platform specific projects.

If you are using a ViewModel/IOC approach your code may look like:

Expand Down Expand Up @@ -51,7 +51,7 @@ public async Task<bool> MakePurchase()
}
```

It is recommended to not us a using statement, but instead just call the single `Dispose` on the static class, which will also dispose the `Current`:
It is recommended to not use a using statement, but instead just call the single `Dispose` on the static class, which will also dispose the `Current`:

```csharp
public async Task<bool> MakePurchase()
Expand Down

0 comments on commit 4c4e2d2

Please sign in to comment.