OnInjectionCompleteAttribute Class

Summary

An System.Attribute for static parameterless methods to have Weaver invoke them once the static dependency injection is complete.
Assembly
Weaver.dll
Namespace
Weaver
Interfaces
  • IInjector
Base Types
  • Attribute
graph BT Type-->Base0["Attribute"] Type-.->Interface0["IInjector"] Type["OnInjectionCompleteAttribute"] class Type type-node

Syntax

[AttributeUsage(AttributeTargets.Method)]
public sealed class OnInjectionCompleteAttribute : Attribute, IInjector

Attributes

Type Description
AttributeUsageAttribute

Properties

Name Value Summary
EditorOnly bool
If set to true, this attribute won't be used in builds. Must be set for attributes inside #if UNITY_EDITOR regions since that fact can't be detected automatically.
ExecutionTime int
Determines the order in which the attributed method should be executed in relation to other injection events. Methods are executed from lowest Weaver.OnInjectionCompleteAttribute.ExecutionTime to highest.
InEditMode bool
[Editor-Only] Indicates whether the attributed method should be invoked in Edit Mode, otherwise it will only be invoked in Play Mode and on startup in a build.

Methods

Name Value Summary
CompareExecutionTime(OnInjectionCompleteAttribute, OnInjectionCompleteAttribute) int
Compares the Weaver.OnInjectionCompleteAttribute.ExecutionTime of each attribute.
static
Invoke() void
[Editor-Only] Invokes the attributed member. Catches and logs any exceptions.
OnInspectorGUI() void
[Editor-Only] Draws the GUI for this attribute in the inspector.
ToString() string
[Editor-Only] Returns a description of this attribute and the attributed method.