다음을 통해 공유


IGuardedOperations Interface

Definition

Operations that guard calls to extensions code, track performance and log errors.

public interface class IGuardedOperations
public interface IGuardedOperations
type IGuardedOperations = interface
Public Interface IGuardedOperations
Derived

Remarks

This class supports the Visual Studio infrastructure and in general is not intended to be used directly from your code.

Methods

CallExtensionPoint(Action)

Makes a guarded call to an extension point.

CallExtensionPoint(Object, Action, Predicate<Exception>)

Makes a guarded call to an extension point.

CallExtensionPoint(Object, Action)

Makes a guarded call to an extension point.

CallExtensionPoint<T>(Func<T>, T)

Makes a guarded call to an extension point.

CallExtensionPoint<T>(Object, Func<T>, T)

Makes a guarded call to an extension point.

CallExtensionPointAsync(Func<Task>)

Makes a guarded call to an async extension point.

CallExtensionPointAsync(Object, Func<Task>)

Makes a guarded call to an async extension point.

CallExtensionPointAsync<T>(Func<Task<T>>, T)

Makes a guarded call to an async extension point.

CallExtensionPointAsync<T>(Object, Func<Task<T>>, T)

Makes a guarded call to an async extension point.

FindEligibleFactories<TExtensionFactory,TMetadataView>(IEnumerable<Lazy<TExtensionFactory,TMetadataView>>, IContentType, IContentTypeRegistryService)

Selects extension factories whose declared content type metadata matches the provided target content type, taking into account that extension factory may be disabled by a Replace attribute on another factory.

HandleException(Object, Exception)

Handles an exception occured in a call to an extension point.

InstantiateExtension<TExtension,TMetadata,TExtensionInstance>(Object, Lazy<TExtension,TMetadata>, Func<TExtension,TExtensionInstance>)

Safely invokes a delegate on the extension point.

InstantiateExtension<TExtension,TMetadata>(Object, Lazy<TExtension,TMetadata>)

Safely instantiates an extension point.

InstantiateExtension<TExtension>(Object, Lazy<TExtension>)

Safely instantiates an extension point.

InvokeBestMatchingFactory<TExtension,TMetadataView>(IList<Lazy<TExtension,TMetadataView>>, IContentType, IContentTypeRegistryService, Object)

Safely instantiates an extension point whose declared content type metadata is the closest match to the provided target content type.

InvokeBestMatchingFactory<TExtensionFactory,TExtensionInstance, TMetadataView>(IList<Lazy<TExtensionFactory,TMetadataView>>, IContentType, Func<TExtensionFactory,TExtensionInstance>, IContentTypeRegistryService, Object)

Safely invokes a delegate on the extension factory whose declared content type metadata is the best match to the provided target content type.

InvokeEligibleFactories<TExtensionInstance,TExtensionFactory, TMetadataView>(IEnumerable<Lazy<TExtensionFactory,TMetadataView>>, Func<TExtensionFactory,TExtensionInstance>, IContentType, IContentTypeRegistryService, Object)

Safely invokes a delegate on all extension factories whose declared content type metadata matches the provided target content type, taking into account that extension factory may be disabled by a Replace attribute on another factory.

InvokeMatchingFactories<TExtensionInstance,TExtensionFactory, TMetadataView>(IEnumerable<Lazy<TExtensionFactory,TMetadataView>>, Func<TExtensionFactory,TExtensionInstance>, IContentType, Object)

Safely invokes a delegate on all extension factories whose declared content type metadata matches the provided target content type.

RaiseEvent(Object, EventHandler)

Safely raises an event with empty EventArgs. Errors are tracked per sender, performance is tracked per handler.

RaiseEvent<TArgs>(Object, EventHandler<TArgs>, TArgs)

Safely raises an event with specified args. Errors are tracked per sender, performance is tracked per handler.

RaiseEventOnBackgroundAsync<TArgs>(Object, AsyncEventHandler<TArgs>, TArgs)

Safely raises an event on a background thread with specified args. Errors are tracked per sender, performance is tracked per handler.

TryCastToType<TArgs>(Object, TArgs)

Safely attempts to cast the given object to the given type.

Applies to