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
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 SourceServiceProvider(Object, DependencyProperty)
Initialize a new instance of the Service
Declaration
public ServiceProvider(object element, DependencyProperty property)
Parameters
Type | Name | Description |
---|---|---|
System. |
element | |
Dependency |
property |
ServiceProvider(Object, DependencyProperty, List<Object>)
Initialize a new instance of the Service
Declaration
public ServiceProvider(object element, DependencyProperty property, List<object> parents)
Parameters
Type | Name | Description |
---|---|---|
System. |
element | |
Dependency |
property | |
System. |
parents |
Properties
| Improve this Doc View SourceTargetObject
Declaration
public object TargetObject { get; }
Property Value
Type | Description |
---|---|
System. |
TargetProperty
Declaration
public object TargetProperty { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
| Improve this Doc View SourceGetService(Type)
Gets the service object of the specified type.
Declaration
public object GetService(Type serviceType)
Parameters
Type | Name | Description |
---|---|---|
System. |
serviceType | An object that specifies the type of service object to get. |
Returns
Type | Description |
---|---|
System. |
A service object of type serviceType.-or- null if there is no service object of type serviceType. |
Implements
System.IServiceProvider