Manages dependencies for a plugin
More...
Manages dependencies for a plugin
◆ AddDependency< T >() [1/3]
void pluginbase.Dependencies.PluginDependencies.AddDependency< T > |
( |
T |
depn, |
|
|
bool |
depnOverride, |
|
|
bool |
force |
|
) |
| |
Add a dependency to be used within a plugin context
- Parameters
-
depn | The dependency |
depnOverride | If true, will override any existing dependencies of the same types |
force | If set to true, will add dependency even if not marked as an injectable |
- Template Parameters
-
T | The type in which to inject on |
38 AddDependency(typeof(T), depn, depnOverride, force);
◆ AddDependency< T >() [2/3]
void pluginbase.Dependencies.PluginDependencies.AddDependency< T > |
( |
T |
depn, |
|
|
bool |
depnOverride |
|
) |
| |
Add a dependency to be used within a plugin context
- Parameters
-
depn | The dependency |
depnOverride | If true, will override any existing dependencies of the same types |
- Template Parameters
-
T | The type in which to inject on |
50 AddDependency(depn, depnOverride,
false);
◆ AddDependency< T >() [3/3]
void pluginbase.Dependencies.PluginDependencies.AddDependency< T > |
( |
T |
depn | ) |
|
Add a dependency to be used within a plugin context
- Parameters
-
- Template Parameters
-
T | The type in which to inject on |
61 AddDependency(depn,
false,
false);
◆ GetDependency()
object pluginbase.Dependencies.PluginDependencies.GetDependency |
( |
Assembly |
asker, |
|
|
Type |
type |
|
) |
| |
Get a dependency of a type on behalf of a specific assembly
- Returns
- The dependency.
- Parameters
-
135 DependencyCollection asmDeps;
137 if (_assemblyDependencies.TryGetValue(asker, out asmDeps)
138 && asmDeps.TryGetDependency(type, out dep))
142 return GetDependency(type);
◆ GetDependency< T >()
T pluginbase.Dependencies.PluginDependencies.GetDependency< T > |
( |
Assembly |
asker | ) |
|
Gets the dependency or returns null
- Returns
- The dependency.
- Template Parameters
-
157 return (T)GetDependency(asker, typeof(T));
The documentation for this class was generated from the following file: