Open emre1702 opened 3 years ago
This would also open up the possibility to mock the alt:V API. Here I've tried that and it works pretty nice: https://dotnetfiddle.net/zNUAgW Didn't use setter to lower the chance to replace the api by accident.
So the advantages would be:
Only disadvantage I can think about currently:
All api classes like AltV.Net.Alt, AltChat etc. are static. This totally takes away the possibility to write extensions for those without getting much benefit.
Extensions for theses classes make the code much cleaner by allowing consistent code. E.g. Alt.CreateGang would be consistent and clean.
This is specially important for libraries and other resources. E.g. for my custom commands resource I'd like to extend AltChat, for a possible gang library I'd like to extend Alt and AltAsync. That would make the libraries and resources much easier to use.
Edit: For my library I'll extend IServer so the user can use Alt.Core. Not a nice solution but currenty the best.