Table of Contents

Class ContainerManage

Namespace
AT.Librarys.Container
Assembly
AT.Librarys.Container.dll

容器管理器

public class ContainerManage
Inheritance
ContainerManage
Inherited Members
Extension Methods

Properties

Instance

获取容器

public static ContainerManage Instance { get; }

Property Value

ContainerManage

ItemsInstance

实例集合

public ConcurrentList<ModuleInstanceInfo> ItemsInstance { get; }

Property Value

ConcurrentList<ModuleInstanceInfo>

ItemsType

类型集合

public List<ModuleTypeInfo> ItemsType { get; }

Property Value

List<ModuleTypeInfo>

Name

名称

public string Name { get; }

Property Value

string

Methods

AddOrUpdate(string, string, string, string, object)

添加或更新实例

public bool AddOrUpdate(string stationName, string instanceName, string interfaceFullName, string moduleName, object instance)

Parameters

stationName string

工位名称

instanceName string

实例名称

interfaceFullName string

接口全名

moduleName string

模块名称

instance object

实例

Returns

bool

AddOrUpdate<T>(string, string, string, object)

添加或更新实例

public bool AddOrUpdate<T>(string stationName, string instanceName, string moduleName, object instance) where T : class

Parameters

stationName string

工位名称

instanceName string

实例名称

moduleName string

模块名称

instance object

实例

Returns

bool

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

moduleName string

模块名称

_namespace string

命名空间

version string

版本

type Type

类型

Returns

bool

Type Parameters

T

模块接口

AddType<T>(IBundleContext, Type)

添加或更新类型

public bool AddType<T>(IBundleContext context, Type type) where T : class

Parameters

context IBundleContext
type Type

Returns

bool

Type Parameters

T

CreateInstance(string, ModuleTypeInfo)

创建实例

public object CreateInstance(string instanceName, ModuleTypeInfo typeStruct)

Parameters

instanceName string

实例名称

typeStruct ModuleTypeInfo

类型信息

Returns

object

Delete(string)

删除实例

public bool Delete(string instanceName)

Parameters

instanceName string

实例名称

Returns

bool

DeleteModule(string)

删除模块的所有实例

public bool DeleteModule(string modelueName)

Parameters

modelueName string

模块名称

Returns

bool

DeleteStation(string)

删除工位

public bool DeleteStation(string stationName)

Parameters

stationName string

工位名称

Returns

bool

DeleteToolkit(string)

删除工具

public bool DeleteToolkit(string stationName)

Parameters

stationName string

工位名称(工位作用域)

Returns

bool

DeleteToolkit(string, string)

删除工具

public bool DeleteToolkit(string stationName, string instanceName)

Parameters

stationName string

工位名称(工位作用域)

instanceName string

工具名称

Returns

bool

DeleteType<T>(string)

删除类型

public bool DeleteType<T>(string moduleName)

Parameters

moduleName string

模块名称

Returns

bool

Type Parameters

T

接口类型

Get(string)

获取实例

public IModuleBase Get(string instanceName)

Parameters

instanceName string

工具名称

Returns

IModuleBase

Get(string, string)

获取实例

public IModuleBase Get(string stationName, string instanceName)

Parameters

stationName string

工位名称

instanceName string

实例名称

Returns

IModuleBase

GetBundleInfo()

获取插件信息

public List<BundleInfoView> GetBundleInfo()

Returns

List<BundleInfoView>

GetBundleVersion(BundleInfo)

获取插件版本

public string GetBundleVersion(BundleInfo bundleInfo)

Parameters

bundleInfo BundleInfo

插件信息

Returns

string

GetBundleVersion(IBundleContext)

获取插件版本

public string GetBundleVersion(IBundleContext context)

Parameters

context IBundleContext

上下文

Returns

string

GetFirst<T>()

获取第一个实例

public T GetFirst<T>() where T : class

Returns

T

Type Parameters

T

实例类型

GetInstanceNamesAll()

获取实例名称

public List<string> GetInstanceNamesAll()

Returns

List<string>

GetInstanceNames<T>()

获取实例名称

public List<string> GetInstanceNames<T>() where T : class

Returns

List<string>

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

interfaceName string

接口名称

Returns

List<IModuleBase>

GetStation(string)

获取实例

public IStationBase GetStation(string stationName)

Parameters

stationName string

工位名称

Returns

IStationBase

GetStationInstance()

获取工位实例

public List<IStationBase> GetStationInstance()

Returns

List<IStationBase>

GetStationInstance(string)

获取工位实例

public IStationBase GetStationInstance(string stationName)

Parameters

stationName string

工位名称

Returns

IStationBase

GetStationInstanceSingle()

获取工位实例(一个类型只获取一个实例)

public List<IStationBase> GetStationInstanceSingle()

Returns

List<IStationBase>

GetToolkit(string, string)

获取实例

public IToolkitBase GetToolkit(string stationName, string toolkitName)

Parameters

stationName string

工位名称

toolkitName string

工具名称

Returns

IToolkitBase

GetToolkitInstance()

获取工具实例

public List<IToolkitBase> GetToolkitInstance()

Returns

List<IToolkitBase>

GetToolkitInstance(string)

获取工具实例

public IToolkitBase GetToolkitInstance(string toolkitName)

Parameters

toolkitName string

工具名称

Returns

IToolkitBase

GetToolkitInstance(string, string)

获取工具实例

public IToolkitBase GetToolkitInstance(string stationName, string toolkitName)

Parameters

stationName string

工位名称

toolkitName string

工具名称

Returns

IToolkitBase

GetToolkitInstanceSingle()

获取工具实例(一个类型只获取一个实例)

public List<IToolkitBase> GetToolkitInstanceSingle()

Returns

List<IToolkitBase>

GetToolkitInstance<T>(string)

获取工具实例

public List<T> GetToolkitInstance<T>(string name) where T : class

Parameters

name string

名称

Returns

List<T>

Type Parameters

T

类型

GetType(string)

获取工具类型

public ModuleTypeInfo GetType(string moduleName)

Parameters

moduleName string

模块名称

Returns

ModuleTypeInfo

GetTypes(string)

获取类型

public List<ModuleTypeInfo> GetTypes(string interfaceName)

Parameters

interfaceName string

接口名称

Returns

List<ModuleTypeInfo>

GetTypes<T>()

获取类型

public List<ModuleTypeInfo> GetTypes<T>()

Returns

List<ModuleTypeInfo>

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

instanceName string

实例名

Returns

T

Type Parameters

T

Get<T>(string, string)

获取实例

public T Get<T>(string stationName, string instanceName) where T : class

Parameters

stationName string

工位名

instanceName string

实例名

Returns

T

Type Parameters

T

Get<T>(string, string, string)

获取实例

public T Get<T>(string stationName, string toolkitName, string instanceName) where T : class

Parameters

stationName string

工位名称

toolkitName string

工具名称

instanceName string

实例名称

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

instanceName string

实例名

Returns

List<T>

Type Parameters

T

类型

InstallPlugin(string)

安装插件

public bool InstallPlugin(string folderPath)

Parameters

folderPath string

目录

Returns

bool

OnItemsChange(string, ItemChangeCategory, object)

触发实例发生改变事件

public void OnItemsChange(string name, ItemChangeCategory category, object instances)

Parameters

name string
category ItemChangeCategory
instances object

UninstallPluin(string, string)

卸载插件

public bool UninstallPluin(string symbolicName, string path)

Parameters

symbolicName string
path string

文件夹路径

Returns

bool

Events

ItemsChange

实例发生改变事件

public event EventHandler<ItemChangeEventArgs> ItemsChange

Event Type

EventHandler<ItemChangeEventArgs>