Show / Hide Table of Contents

Class ServiceProvider

Defines a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.

Inheritance
System.Object
ServiceProvider
Implements
System.IServiceProvider
IProvideValueTarget
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System
Assembly: OpenSilver.dll
Syntax
public class ServiceProvider : IServiceProvider, IProvideValueTarget

Constructors

| Improve this Doc View Source

ServiceProvider(Object, DependencyProperty)

Initialize a new instance of the ServiceProvider class.

Declaration
public ServiceProvider(object element, DependencyProperty property)
Parameters
Type Name Description
System.Object element
DependencyProperty property
| Improve this Doc View Source

ServiceProvider(Object, DependencyProperty, List<Object>)

Initialize a new instance of the ServiceProvider class.

Declaration
public ServiceProvider(object element, DependencyProperty property, List<object> parents)
Parameters
Type Name Description
System.Object element
DependencyProperty property
System.Collections.Generic.List<System.Object> parents

Properties

| Improve this Doc View Source

TargetObject

Declaration
public object TargetObject { get; }
Property Value
Type Description
System.Object
| Improve this Doc View Source

TargetProperty

Declaration
public object TargetProperty { get; }
Property Value
Type Description
System.Object

Methods

| Improve this Doc View Source

GetService(Type)

Gets the service object of the specified type.

Declaration
public object GetService(Type serviceType)
Parameters
Type Name Description
System.Type serviceType

An object that specifies the type of service object to get.

Returns
Type Description
System.Object

A service object of type serviceType.-or- null if there is no service object of type serviceType.

Implements

System.IServiceProvider
IProvideValueTarget
  • Improve this Doc
  • View Source