We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
there are many classes that i finish the name with "Signal" and i define them with DeclareSignal.
I think there can be a solution that declares many signal classes automatically like using reflection and attributes.
The text was updated successfully, but these errors were encountered:
public override void InstallBindings() { SignalBusInstaller.Install(Container); InstallBindingsOfType<GameSignalBase>(false); InstallBindingsOfType<OptionalGameSignalBase>(true); } private void InstallBindingsOfType<T>(bool bOptional) { var signalTypeEnumerator = Assembly.GetAssembly(GetType()).GetTypes() .Where(t => t.IsClass && !t.IsAbstract && typeof(T).IsAssignableFrom(t)); var typeEnumerator = signalTypeEnumerator.ToList(); if (typeEnumerator.Any()) { foreach (var type in typeEnumerator) { if (bOptional) { Container.DeclareSignal(type).OptionalSubscriber(); } else { Container.DeclareSignal(type); } } } }
Sorry, something went wrong.
No branches or pull requests
there are many classes that i finish the name with "Signal" and i define them with DeclareSignal.
I think there can be a solution that declares many signal classes automatically like using reflection and attributes.
The text was updated successfully, but these errors were encountered: