Επεξεργασία

Κοινή χρήση μέσω


TypeDescriptor.Refresh Method

Definition

Clears the properties and events from the cache.

Overloads

Refresh(Object)

Clears the properties and events for the specified component from the cache.

Refresh(Assembly)

Clears the properties and events for the specified assembly from the cache.

Refresh(Module)

Clears the properties and events for the specified module from the cache.

Refresh(Type)

Clears the properties and events for the specified type of component from the cache.

Refresh(Object)

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs

Clears the properties and events for the specified component from the cache.

public:
 static void Refresh(System::Object ^ component);
public static void Refresh (object component);
static member Refresh : obj -> unit
Public Shared Sub Refresh (component As Object)

Parameters

component
Object

A component for which the properties or events have changed.

Examples

For an example of using this method, see the RefreshEventHandler class.

Remarks

Properties and events are cached by TypeDescriptor for speed. Typically, they are constant for the lifetime of an object. However, extender providers and designers can change the set of properties on an object. If they do, they should call this method to clear the property and event descriptors of the object. This method is used only at design time. It is not used during run time.

This method also raises a Refreshed event when the properties or events of a component change. This event is only raised if there was a prior call to the GetProperties or GetEvents method that cached the information.

See also

Applies to

Refresh(Assembly)

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs

Clears the properties and events for the specified assembly from the cache.

public:
 static void Refresh(System::Reflection::Assembly ^ assembly);
public static void Refresh (System.Reflection.Assembly assembly);
static member Refresh : System.Reflection.Assembly -> unit
Public Shared Sub Refresh (assembly As Assembly)

Parameters

assembly
Assembly

The Assembly that represents the assembly to refresh. Each Type in this assembly will be refreshed.

Remarks

Properties and events are cached by TypeDescriptor for speed. Typically, they are constant for the lifetime of an object. However, extender providers and designers can change the set of properties on an object. If they do, they can call this method to clear the property and event descriptors of the object. This method is used only at design time. It is not used during run time.

Before you make a call to the Refresh method to clear the cache, you need to call the GetProperties method for the specific assembly to cache the information first.

This method also raises a Refreshed event to notify all classes that want to be notified when the property set of a component changes.

See also

Applies to

Refresh(Module)

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs

Clears the properties and events for the specified module from the cache.

public:
 static void Refresh(System::Reflection::Module ^ module);
public static void Refresh (System.Reflection.Module module);
static member Refresh : System.Reflection.Module -> unit
Public Shared Sub Refresh (module As Module)

Parameters

module
Module

The Module that represents the module to refresh. Each Type in this module will be refreshed.

Remarks

Properties and events are cached by TypeDescriptor for speed. Typically, they are constant for the lifetime of an object. However, extender providers and designers can change the set of properties on an object. If they do, they can call this method to clear the property and event descriptors of the object. This method is used only at design time. It is not used during run time.

Before you make a call to the Refresh method to clear the cache, you need to call the GetProperties method for the specific module to cache the information first.

This method also raises a Refreshed event to notify all classes that want to be notified when the property set of a component changes.

See also

Applies to

Refresh(Type)

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs

Clears the properties and events for the specified type of component from the cache.

public:
 static void Refresh(Type ^ type);
public static void Refresh (Type type);
static member Refresh : Type -> unit
Public Shared Sub Refresh (type As Type)

Parameters

type
Type

The Type of the target component.

Remarks

Call this version of this method only when you do not have an instance of the object.

Properties and events are cached by TypeDescriptor for speed. Typically, they are constant for the lifetime of an object. However, extender providers and designers can change the set of properties on an object. If they do, they can call this method to clear the property and event descriptors of the object. This method is used only at design time. It is not used during run time.

This method also raises a Refreshed event when the properties or events of a component change. This event is only raised if there was a prior call to the GetProperties or GetEvents method that cached the information.

See also

Applies to