C# Класс Nexus.Client.ModManagement.Scripting.XmlScript.ConditionalOptionTypeResolver

An option type that is dependent upon the state of external conditions.
Наследование: IOptionTypeResolver
Показать файл Открыть проект

Открытые методы

Метод Описание
AddPattern ( OptionType p_ptpType, ICondition p_cndCondition ) : void

Adds a pattern that returns the given option type if the given condition is fulfilled.

ConditionalOptionTypeResolver ( OptionType p_ptpDefaultType ) : System

A simple constructor that initializes the object with the given values.

ResolveOptionType ( ConditionStateManager p_csmStateManager ) : OptionType

Gets the plugin type.

The returned type is dependent upon external state. A list of patterns are matched against external state (e.g., installed files); the first pattern that is fulfilled determines the returned type. If no pattern is fulfilled, a default type if returned.

Описание методов

AddPattern() публичный Метод

Adds a pattern that returns the given option type if the given condition is fulfilled.
public AddPattern ( OptionType p_ptpType, ICondition p_cndCondition ) : void
p_ptpType OptionType The type the pattern will return if the condition is fulfilled.
p_cndCondition ICondition The condition that must be fulfilled in order for the pattern /// to return the option type.
Результат void

ConditionalOptionTypeResolver() публичный Метод

A simple constructor that initializes the object with the given values.
public ConditionalOptionTypeResolver ( OptionType p_ptpDefaultType ) : System
p_ptpDefaultType OptionType The default to return /// if no patterns are fulfilled.
Результат System

ResolveOptionType() публичный Метод

Gets the plugin type.
The returned type is dependent upon external state. A list of patterns are matched against external state (e.g., installed files); the first pattern that is fulfilled determines the returned type. If no pattern is fulfilled, a default type if returned.
public ResolveOptionType ( ConditionStateManager p_csmStateManager ) : OptionType
p_csmStateManager ConditionStateManager The manager that tracks the currect install state.
Результат OptionType