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 ServiceProvider class.
Declaration
public ServiceProvider(object element, DependencyProperty property)
Parameters
Type | Name | Description |
---|---|---|
System.Object | element | |
DependencyProperty | property |
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 SourceParents
Gets or sets the List of UIElement that are parents of the element.
Declaration
public List<object> Parents { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.Object> |
TargetObject
Declaration
public object TargetObject { get; }
Property Value
Type | Description |
---|---|
System.Object |
TargetProperty
Declaration
public object TargetProperty { get; }
Property Value
Type | Description |
---|---|
System.Object |
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.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