ISettingsProviderService 介面

定義

提供用於定義替代應用程式設定提供者的介面。

public interface class ISettingsProviderService
public interface ISettingsProviderService
type ISettingsProviderService = interface
Public Interface ISettingsProviderService

備註

介面 IPersistComponentSettings 可讓裝載在應用程式中的控制項和元件,以對應用程式大幅透明的方式保存其應用程式設定。 不過,在某些情況下,應用程式或環境可能需要覆寫元件原生使用的設定提供者,並自行選擇其中一個。 介面 ISettingsProviderService 可讓您建立輕量型服務,以通訊這類替代設定提供者,通常是透過擁有 Container提供。

ISettingsProviderService 通常由設計時間工具和調試程式使用,可提供應用程式設定的特殊支援。 為了順暢地進行這類排列函式,類別 ApplicationSettingsBase 包含採用擁有元件參考的建構函式。 這些建構函式會自動查詢相容的設定提供者。

方法

GetSettingsProvider(SettingsProperty)

傳回與指定設定屬性相容的設定提供者。

適用於

另請參閱