C# 클래스 Nexus.Client.ModManagement.Scripting.XmlScript.ConditionalOptionTypeResolver

An option type that is dependent upon the state of external conditions.
상속: IOptionTypeResolver
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5

공개 메소드들

메소드 설명
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