Editare

Partajați prin


MarshalByValueComponent Class

Definition

Implements IComponent and provides the base implementation for remotable components that are marshaled by value (a copy of the serialized object is passed).

public ref class MarshalByValueComponent : IDisposable, IServiceProvider, System::ComponentModel::IComponent
public ref class MarshalByValueComponent : IServiceProvider, System::ComponentModel::IComponent
[System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ComponentConverter))]
public class MarshalByValueComponent : IDisposable, IServiceProvider, System.ComponentModel.IComponent
public class MarshalByValueComponent : IDisposable, IServiceProvider, System.ComponentModel.IComponent
[System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ComponentConverter))]
[System.Runtime.InteropServices.ComVisible(true)]
public class MarshalByValueComponent : IDisposable, IServiceProvider, System.ComponentModel.IComponent
public class MarshalByValueComponent : IServiceProvider, System.ComponentModel.IComponent
[<System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ComponentConverter))>]
type MarshalByValueComponent = class
    interface IComponent
    interface IDisposable
    interface IServiceProvider
type MarshalByValueComponent = class
    interface IComponent
    interface IDisposable
    interface IServiceProvider
[<System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ComponentConverter))>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type MarshalByValueComponent = class
    interface IComponent
    interface IDisposable
    interface IServiceProvider
Public Class MarshalByValueComponent
Implements IComponent, IDisposable, IServiceProvider
Public Class MarshalByValueComponent
Implements IComponent, IServiceProvider
Inheritance
MarshalByValueComponent
Derived
Attributes
Implements

Remarks

A component can be contained in a container. For each component in a container, the container creates a site that it uses to manage the component. The component interacts with its container primarily through a container-provided ISite, which is a repository of container-specific, per-component information.

Notes to Inheritors

When you inherit from this class, you can override the Dispose(), Site, and the GetService(Type) methods.

Constructors

MarshalByValueComponent()

Initializes a new instance of the MarshalByValueComponent class.

Properties

Container

Gets the container for the component.

DesignMode

Gets a value indicating whether the component is currently in design mode.

Events

Gets the list of event handlers that are attached to this component.

Site

Gets or sets the site of the component.

Methods

Dispose()

Releases all resources used by the MarshalByValueComponent.

Dispose(Boolean)

Releases the unmanaged resources used by the MarshalByValueComponent and optionally releases the managed resources.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Finalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetService(Type)

Gets the implementer of the IServiceProvider.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a String containing the name of the Component, if any. This method should not be overridden.

Events

Disposed

Adds an event handler to listen to the Disposed event on the component.

Extension Methods

GetKeyedService<T>(IServiceProvider, Object)

Get service of type T from the IServiceProvider.

GetKeyedServices(IServiceProvider, Type, Object)

Get an enumeration of services of type serviceType from the IServiceProvider.

GetKeyedServices<T>(IServiceProvider, Object)

Get an enumeration of services of type T from the IServiceProvider.

GetRequiredKeyedService(IServiceProvider, Type, Object)

Get service of type serviceType from the IServiceProvider.

GetRequiredKeyedService<T>(IServiceProvider, Object)

Get service of type T from the IServiceProvider.

CreateAsyncScope(IServiceProvider)

Creates a new AsyncServiceScope that can be used to resolve scoped services.

CreateScope(IServiceProvider)

Creates a new IServiceScope that can be used to resolve scoped services.

GetRequiredService(IServiceProvider, Type)

Get service of type serviceType from the IServiceProvider.

GetRequiredService<T>(IServiceProvider)

Get service of type T from the IServiceProvider.

GetService<T>(IServiceProvider)

Get service of type T from the IServiceProvider.

GetServices(IServiceProvider, Type)

Get an enumeration of services of type serviceType from the IServiceProvider.

GetServices<T>(IServiceProvider)

Get an enumeration of services of type T from the IServiceProvider.

GetFakeLogCollector(IServiceProvider)

Gets the object that collects log records sent to the fake logger.

GetFakeRedactionCollector(IServiceProvider)

Gets the fake redactor collector instance from the dependency injection container.

Applies to

See also