userConnacancel
branchsbox/codegen-attributescancel

21 Commits over 0 Days - ∞cph!

1 Year Ago
Remove leftover test code
1 Year 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
1 Year Ago
WrapPropertySet, WrapPropertyGet, WrapMethod
1 Year Ago
Update tests
1 Year 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
1 Year Ago
Fix TestWrapSet
1 Year 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
1 Year 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
1 Year Ago
Only allow CodeGen on custom attributes. Tidy up. CallbackName for CodeGenType.Static is the actual fully qualified name of static method to call
1 Year Ago
Add some extra tests
1 Year 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
1 Year Ago
More documentation
1 Year Ago
Improve docs for CodeGenAttribute
1 Year Ago
Improve documentation
1 Year 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
1 Year 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
1 Year Ago
Tests build
1 Year 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
1 Year Ago
Support CodeGenType.Instance with CodeGenType.WrapCall
1 Year 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
1 Year Ago
Initial tests for static call wrap