Table of Contents

Class ContentPropertyDefinition

Namespace
NuGet.ContentModel
Assembly
Chocolatey.NuGet.Packaging.dll

Defines a property that can be used in Content Model query patterns PatternSet

public class ContentPropertyDefinition
Inheritance
ContentPropertyDefinition
Inherited Members

Constructors

ContentPropertyDefinition(string)

public ContentPropertyDefinition(string name)

Parameters

name string

ContentPropertyDefinition(string, IEnumerable<string>)

public ContentPropertyDefinition(string name, IEnumerable<string> fileExtensions)

Parameters

name string
fileExtensions IEnumerable<string>

ContentPropertyDefinition(string, IEnumerable<string>, bool)

public ContentPropertyDefinition(string name, IEnumerable<string> fileExtensions, bool allowSubfolders)

Parameters

name string
fileExtensions IEnumerable<string>
allowSubfolders bool

ContentPropertyDefinition(string, Func<object, object, bool>)

public ContentPropertyDefinition(string name, Func<object, object, bool> compatibilityTest)

Parameters

name string
compatibilityTest Func<object, object, bool>

ContentPropertyDefinition(string, Func<string, PatternTable, object>)

public ContentPropertyDefinition(string name, Func<string, PatternTable, object> parser)

Parameters

name string
parser Func<string, PatternTable, object>

ContentPropertyDefinition(string, Func<string, PatternTable, object>, IEnumerable<string>)

public ContentPropertyDefinition(string name, Func<string, PatternTable, object> parser, IEnumerable<string> fileExtensions)

Parameters

name string
parser Func<string, PatternTable, object>
fileExtensions IEnumerable<string>

ContentPropertyDefinition(string, Func<string, PatternTable, object>, IEnumerable<string>, bool)

public ContentPropertyDefinition(string name, Func<string, PatternTable, object> parser, IEnumerable<string> fileExtensions, bool allowSubfolders)

Parameters

name string
parser Func<string, PatternTable, object>
fileExtensions IEnumerable<string>
allowSubfolders bool

ContentPropertyDefinition(string, Func<string, PatternTable, object>, Func<object, object, bool>)

public ContentPropertyDefinition(string name, Func<string, PatternTable, object> parser, Func<object, object, bool> compatibilityTest)

Parameters

name string
parser Func<string, PatternTable, object>
compatibilityTest Func<object, object, bool>

ContentPropertyDefinition(string, Func<string, PatternTable, object>, Func<object, object, bool>, Func<object, object, object, int>)

public ContentPropertyDefinition(string name, Func<string, PatternTable, object> parser, Func<object, object, bool> compatibilityTest, Func<object, object, object, int> compareTest)

Parameters

name string
parser Func<string, PatternTable, object>
compatibilityTest Func<object, object, bool>
compareTest Func<object, object, object, int>

ContentPropertyDefinition(string, Func<string, PatternTable, object>, Func<object, object, bool>, Func<object, object, object, int>, IEnumerable<string>, bool)

public ContentPropertyDefinition(string name, Func<string, PatternTable, object> parser, Func<object, object, bool> compatibilityTest, Func<object, object, object, int> compareTest, IEnumerable<string> fileExtensions, bool allowSubfolders)

Parameters

name string
parser Func<string, PatternTable, object>
compatibilityTest Func<object, object, bool>
compareTest Func<object, object, object, int>
fileExtensions IEnumerable<string>
allowSubfolders bool

Properties

CompareTest

Find the nearest compatible candidate.

public Func<object, object, object, int> CompareTest { get; }

Property Value

Func<object, object, object, int>

CompatibilityTest

public Func<object, object, bool> CompatibilityTest { get; }

Property Value

Func<object, object, bool>

FileExtensionAllowSubFolders

public bool FileExtensionAllowSubFolders { get; }

Property Value

bool

FileExtensions

public List<string> FileExtensions { get; }

Property Value

List<string>

Name

public string Name { get; }

Property Value

string

Parser

public Func<string, PatternTable, object> Parser { get; }

Property Value

Func<string, PatternTable, object>

Methods

Compare(object, object, object)

public virtual int Compare(object criteriaValue, object candidateValue1, object candidateValue2)

Parameters

criteriaValue object
candidateValue1 object
candidateValue2 object

Returns

int

IsCriteriaSatisfied(object, object)

public virtual bool IsCriteriaSatisfied(object critieriaValue, object candidateValue)

Parameters

critieriaValue object
candidateValue object

Returns

bool

TryLookup(string, PatternTable, out object)

public virtual bool TryLookup(string name, PatternTable table, out object value)

Parameters

name string
table PatternTable
value object

Returns

bool