This project is read-only.

Property

Property is an entity in Property set, it's used so PropertyProvider can determine which property is requested.
e.g. PropertyProvider.GetProperty(FileInfoProperties.Length).ValueAsInt64;

A Property set looks like the following :

In COFE.Core\Entry\Properties\DefinedProperties\FSIProperties
/// <summary>
/// {10-49} A list of properties for FileSystemInfo.
/// </summary>
public enum FileSystemInfoProperties : int
{   
    ...
    /// <summary>
    /// Get Last write time for an entries.
    /// </summary>
    [PropertyType(PropertyTypeAttribute.DateTimeDefaultEnum.Min)]
    [Metadata(true)]
    [Alias("Time")]
    LastWriteTimeUtc,
    ...
} 

Entry support a set of properties, by obtaining from it's primary PropertyProvider or multiple static secondary PropertyProvider.
EntryList support properties by returning property of the first, or aggregate number or string property. It also support actions, which is also properties by obtaining from multiple static secondary PropertyProvider

Most properties are decorated by some of these attributes, some will be used to validate the value returned from it's PropertyProvider
Attribute Validate Description
PropertyType Yes define the .net type (e.g. typeof(DateTime)) of the property, and the default value (if no property provider support that property).
FileName Yes the property returns a file name.
FilePath Yes the property returns a file path.
Metadata No the property returns a metadata (true means major metadata)
Resource No the property returns a resource (usually take longer time to load)
BitmapSize Yes define the size
Alias No override the default name of the property (in this case FileSystemInfoProperties.LastWriteTimeUtc)
Action Yes the property returns an action (Func<IEntryList, string, IWorkProgress, IEntryList>).


Links : Property Types | Known Properties

Last edited Nov 26, 2012 at 7:18 PM by lycj, version 14

Comments

No comments yet.