userConnacancel
branchsbox/codegen-attributescancel

21 Commits over 0 Days - ∞cph!

7 Months Ago
Remove leftover test code
7 Months Ago
Fix tests + fix issues with props that only have set; or get; No need to wrap getValue() body in {} as already have them Use SemanticModel.LookupSymbols to find and validate methods taking inheritance into account
7 Months Ago
WrapPropertySet, WrapPropertyGet, WrapMethod
7 Months Ago
Update tests
7 Months Ago
Run WrapSet and WrapGet if both are specified. When passing to static callback always pass propertyName or methodName as fully qualified name. Support type argument for return type and Func param Nicer error when can't find type to invoke on for passed callback name CodeGeneratorFlags/CodeGeneratorAttribute renaming
7 Months Ago
Fix TestWrapSet
7 Months Ago
Can now propertly wrap setters/getters. Setter callback passes Action<T> you can call to run default behavior Fix error if value statement empty Update tests
7 Months Ago
Auto generate backing fields for properties. Pass current value in WrapGet callbacks. Set backing field before calling WrapSet callbacks. Update method validation error prints appropriately Fixed ValidatePropertyCallback
7 Months Ago
Only allow CodeGen on custom attributes. Tidy up. CallbackName for CodeGenType.Static is the actual fully qualified name of static method to call
7 Months Ago
Add some extra tests
7 Months Ago
Fixed logic in WrapSet Added method validation. Compiler will let you know what methods you're missing when using CodeGen and what types, return types etc they need
7 Months Ago
More documentation
7 Months Ago
Improve docs for CodeGenAttribute
7 Months Ago
Improve documentation
7 Months Ago
Fixed a bug with static set/get wrap codegen not passing correct method name. Now support also adding [CodeGen] attributes directly to a method or property bypassing an attribute alias, these don't require setting the Instance/Static flags. Use nameof where possible Fixed tests for WrapSet/WrapGet
7 Months Ago
Let CodeGenType.WrapCall proxies return their own values. They can simple do "return resume();" if they wanna keep intended behavior, so we can also wrap methods that don't just return void
7 Months Ago
Tests build
7 Months Ago
Added first version of WrapSet/WrapGet Unit test stubs Don't pass value for get accessor.. Cast to original return type in get accessor when wrapping
7 Months Ago
Support CodeGenType.Instance with CodeGenType.WrapCall
7 Months Ago
Finally sort of got somewhere... bit of a nightmare to debug this right now. Allow multiple CodeGenAttribute. Remove from ClientRpc and add some tests locally instead
7 Months Ago
Initial tests for static call wrap