TemplateControl.IFilterResolutionService.CompareFilters(String, String) TemplateControl.IFilterResolutionService.CompareFilters(String, String) TemplateControl.IFilterResolutionService.CompareFilters(String, String) Method

定義

傳回值,指出兩個指定的裝置篩選條件之間是否存在父子式關聯性。Returns a value that indicates whether a parent/child relationship exists between two specified device filters.

 virtual int System.Web.UI.IFilterResolutionService.CompareFilters(System::String ^ filter1, System::String ^ filter2) = System::Web::UI::IFilterResolutionService::CompareFilters;
int IFilterResolutionService.CompareFilters (string filter1, string filter2);
Function CompareFilters (filter1 As String, filter2 As String) As Integer Implements IFilterResolutionService.CompareFilters

參數

filter1
String String String

裝置篩選條件名稱。A device filter name.

filter2
String String String

裝置篩選條件名稱。A device filter name.

傳回

如果 filter1filter2 的父代,則為 1;如果 filter2filter1 的父代,則為 -1;否則,如果 filter1filter2 之間沒有任何父子式關聯性,則為 0。1, if filter1 is a parent of filter2; -1, if filter2 is a parent of filter1; otherwise, 0, if there is no parent/child relationship between filter1 and filter2.

實作

備註

IFilterResolutionService.CompareFilters方法屬於IFilterResolutionService介面,這是特定的控制項設計工具的環境中所使用的裝置篩選條件。The IFilterResolutionService.CompareFilters method is part of the IFilterResolutionService interface, which is specific to how a control uses device filters in a designer environment. 當控制項剖析或保存在瀏覽器要求,設計工具的環境內容之外IFilterResolutionService提供一個方式來判斷目前的控制會受到以具名的篩選條件和指定的篩選器是否屬於特定的一部分裝置篩選條件的階層。When controls are parsed or persisted in the designer environment outside the context of a browser request, the IFilterResolutionService provides a way to determine if the current control is affected by a named filter and whether a named filter is part of a specific device-filter hierarchy.

適用於

另請參閱