Class ContainerManage
容器管理器
public class ContainerManage
- Inheritance
-
ContainerManage
- Inherited Members
- Extension Methods
Properties
Instance
获取容器
public static ContainerManage Instance { get; }
Property Value
ItemsInstance
实例集合
public ConcurrentList<ModuleInstanceInfo> ItemsInstance { get; }
Property Value
ItemsType
类型集合
public List<ModuleTypeInfo> ItemsType { get; }
Property Value
Name
名称
public string Name { get; }
Property Value
Methods
AddOrUpdate(string, string, string, string, object)
添加或更新实例
public bool AddOrUpdate(string stationName, string instanceName, string interfaceFullName, string moduleName, object instance)
Parameters
stationNamestring工位名称
instanceNamestring实例名称
interfaceFullNamestring接口全名
moduleNamestring模块名称
instanceobject实例
Returns
AddOrUpdate<T>(string, string, string, object)
添加或更新实例
public bool AddOrUpdate<T>(string stationName, string instanceName, string moduleName, object instance) where T : class
Parameters
Returns
Type Parameters
T接口类型
AddType<T>(string, string, string, Type)
添加或更新类型
public bool AddType<T>(string moduleName, string _namespace, string version, Type type) where T : class
Parameters
Returns
Type Parameters
T模块接口
AddType<T>(IBundleContext, Type)
添加或更新类型
public bool AddType<T>(IBundleContext context, Type type) where T : class
Parameters
contextIBundleContexttypeType
Returns
Type Parameters
T
CreateInstance(string, ModuleTypeInfo)
创建实例
public object CreateInstance(string instanceName, ModuleTypeInfo typeStruct)
Parameters
instanceNamestring实例名称
typeStructModuleTypeInfo类型信息
Returns
Delete(string)
删除实例
public bool Delete(string instanceName)
Parameters
instanceNamestring实例名称
Returns
DeleteModule(string)
删除模块的所有实例
public bool DeleteModule(string modelueName)
Parameters
modelueNamestring模块名称
Returns
DeleteStation(string)
删除工位
public bool DeleteStation(string stationName)
Parameters
stationNamestring工位名称
Returns
DeleteToolkit(string)
删除工具
public bool DeleteToolkit(string stationName)
Parameters
stationNamestring工位名称(工位作用域)
Returns
DeleteToolkit(string, string)
删除工具
public bool DeleteToolkit(string stationName, string instanceName)
Parameters
Returns
DeleteType<T>(string)
删除类型
public bool DeleteType<T>(string moduleName)
Parameters
moduleNamestring模块名称
Returns
Type Parameters
T接口类型
Get(string)
获取实例
public IModuleBase Get(string instanceName)
Parameters
instanceNamestring工具名称
Returns
Get(string, string)
获取实例
public IModuleBase Get(string stationName, string instanceName)
Parameters
Returns
GetBundleInfo()
获取插件信息
public List<BundleInfoView> GetBundleInfo()
Returns
GetBundleVersion(BundleInfo)
获取插件版本
public string GetBundleVersion(BundleInfo bundleInfo)
Parameters
bundleInfoBundleInfo插件信息
Returns
GetBundleVersion(IBundleContext)
获取插件版本
public string GetBundleVersion(IBundleContext context)
Parameters
contextIBundleContext上下文
Returns
GetFirst<T>()
获取第一个实例
public T GetFirst<T>() where T : class
Returns
- T
Type Parameters
T实例类型
GetInstanceNamesAll()
获取实例名称
public List<string> GetInstanceNamesAll()
Returns
GetInstanceNames<T>()
获取实例名称
public List<string> GetInstanceNames<T>() where T : class
Returns
Type Parameters
T接口类型
GetLast<T>()
获取最后一个实例
public T GetLast<T>() where T : class
Returns
- T
Type Parameters
T实例类型
GetModule(string)
获取实例
public List<IModuleBase> GetModule(string interfaceName)
Parameters
interfaceNamestring接口名称
Returns
GetStation(string)
获取实例
public IStationBase GetStation(string stationName)
Parameters
stationNamestring工位名称
Returns
GetStationInstance()
获取工位实例
public List<IStationBase> GetStationInstance()
Returns
GetStationInstance(string)
获取工位实例
public IStationBase GetStationInstance(string stationName)
Parameters
stationNamestring工位名称
Returns
GetStationInstanceSingle()
获取工位实例(一个类型只获取一个实例)
public List<IStationBase> GetStationInstanceSingle()
Returns
GetToolkit(string, string)
获取实例
public IToolkitBase GetToolkit(string stationName, string toolkitName)
Parameters
Returns
GetToolkitInstance()
获取工具实例
public List<IToolkitBase> GetToolkitInstance()
Returns
GetToolkitInstance(string)
获取工具实例
public IToolkitBase GetToolkitInstance(string toolkitName)
Parameters
toolkitNamestring工具名称
Returns
GetToolkitInstance(string, string)
获取工具实例
public IToolkitBase GetToolkitInstance(string stationName, string toolkitName)
Parameters
Returns
GetToolkitInstanceSingle()
获取工具实例(一个类型只获取一个实例)
public List<IToolkitBase> GetToolkitInstanceSingle()
Returns
GetToolkitInstance<T>(string)
获取工具实例
public List<T> GetToolkitInstance<T>(string name) where T : class
Parameters
namestring名称
Returns
- List<T>
Type Parameters
T类型
GetType(string)
获取工具类型
public ModuleTypeInfo GetType(string moduleName)
Parameters
moduleNamestring模块名称
Returns
GetTypes(string)
获取类型
public List<ModuleTypeInfo> GetTypes(string interfaceName)
Parameters
interfaceNamestring接口名称
Returns
GetTypes<T>()
获取类型
public List<ModuleTypeInfo> GetTypes<T>()
Returns
Type Parameters
T
Get<T>()
获取实例
public List<T> Get<T>() where T : class
Returns
- List<T>
Type Parameters
T
Get<T>(string)
获取实例
public T Get<T>(string instanceName) where T : class
Parameters
instanceNamestring实例名
Returns
- T
Type Parameters
T
Get<T>(string, string)
获取实例
public T Get<T>(string stationName, string instanceName) where T : class
Parameters
Returns
- T
Type Parameters
T
Get<T>(string, string, string)
获取实例
public T Get<T>(string stationName, string toolkitName, string instanceName) where T : class
Parameters
Returns
- T
Type Parameters
T
Gets<T>()
获取实例
public List<T> Gets<T>() where T : class
Returns
- List<T>
Type Parameters
T类型
Gets<T>(string)
获取实例
public List<T> Gets<T>(string instanceName) where T : class
Parameters
instanceNamestring实例名
Returns
- List<T>
Type Parameters
T类型
InstallPlugin(string)
安装插件
public bool InstallPlugin(string folderPath)
Parameters
folderPathstring目录
Returns
OnItemsChange(string, ItemChangeCategory, object)
触发实例发生改变事件
public void OnItemsChange(string name, ItemChangeCategory category, object instances)
Parameters
namestringcategoryItemChangeCategoryinstancesobject
UninstallPluin(string, string)
卸载插件
public bool UninstallPluin(string symbolicName, string path)
Parameters
Returns
Events
ItemsChange
实例发生改变事件
public event EventHandler<ItemChangeEventArgs> ItemsChange