Class AppServiceInfo
Information about the application service.
Inherited Members
Namespace: Kephas.Services.Reflection
Assembly: Kephas.Core.dll
Syntax
public class AppServiceInfo : Expando, IExpando, IDynamicMetaObjectProvider, IIndexable, IAppServiceInfo
Constructors
| Improve this Doc View SourceAppServiceInfo(Type, AppServiceLifetime, Boolean)
Initializes a new instance of the AppServiceInfo class.
Declaration
public AppServiceInfo(Type contractType, AppServiceLifetime lifetime = AppServiceLifetime.Singleton, bool asOpenGeneric = false)
Parameters
Type | Name | Description |
---|---|---|
System.Type | contractType | The contract type of the export. |
AppServiceLifetime | lifetime | Optional. The application service lifetime. |
System.Boolean | asOpenGeneric | Optional.
|
AppServiceInfo(Type, Func<ICompositionContext, Object>, AppServiceLifetime)
Initializes a new instance of the AppServiceInfo class.
Declaration
public AppServiceInfo(Type contractType, Func<ICompositionContext, object> serviceInstanceFactory, AppServiceLifetime lifetime = AppServiceLifetime.Transient)
Parameters
Type | Name | Description |
---|---|---|
System.Type | contractType | The contract type of the export. |
System.Func<ICompositionContext, System.Object> | serviceInstanceFactory | The service instance factory. |
AppServiceLifetime | lifetime | Optional. The application service lifetime. |
AppServiceInfo(Type, Object)
Initializes a new instance of the AppServiceInfo class.
Declaration
public AppServiceInfo(Type contractType, object serviceInstance)
Parameters
Type | Name | Description |
---|---|---|
System.Type | contractType | The contract type of the export. |
System.Object | serviceInstance | The service instance. |
AppServiceInfo(Type, Type, AppServiceLifetime, Boolean)
Initializes a new instance of the AppServiceInfo class.
Declaration
public AppServiceInfo(Type contractType, Type serviceInstanceType, AppServiceLifetime lifetime = AppServiceLifetime.Singleton, bool asOpenGeneric = false)
Parameters
Type | Name | Description |
---|---|---|
System.Type | contractType | The contract type of the export. |
System.Type | serviceInstanceType | Type of the service instance. |
AppServiceLifetime | lifetime | Optional. The application service lifetime. |
System.Boolean | asOpenGeneric | Optional.
|
Properties
| Improve this Doc View SourceAllowMultiple
Gets or sets a value indicating whether multiple services for this contract are allowed.
Declaration
public bool AllowMultiple { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AsOpenGeneric
Gets a value indicating whether the contract should be exported as an open generic.
Declaration
public bool AsOpenGeneric { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ContractType
Gets the contract type of the export.
Declaration
public Type ContractType { get; }
Property Value
Type | Description |
---|---|
System.Type | The contract type of the export. |
Instance
Gets the service instance.
Declaration
public object Instance { get; }
Property Value
Type | Description |
---|---|
System.Object | The service instance. |
InstanceFactory
Gets the service instance factory.
Declaration
public Func<ICompositionContext, object> InstanceFactory { get; }
Property Value
Type | Description |
---|---|
System.Func<ICompositionContext, System.Object> | The service instance factory. |
InstanceType
Gets the type of the service instance.
Declaration
public Type InstanceType { get; }
Property Value
Type | Description |
---|---|
System.Type | The type of the service instance. |
Lifetime
Gets the application service lifetime.
Declaration
public AppServiceLifetime Lifetime { get; }
Property Value
Type | Description |
---|---|
AppServiceLifetime | The application service lifetime. |
MetadataAttributes
Gets or sets the supported metadata attributes.
Declaration
public Type[] MetadataAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.Type[] | The metadata attributes. |
Remarks
The metadata attributes are used to register the conventions for application services.
Methods
| Improve this Doc View SourceToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the current object. |