Search Results for

    Show / Hide Table of Contents

    Class FileProperty

    Represents a FileProperty in the data model.

    FilePropertys are actually splitted into four different columns in the database. It actually consists of a file name, a file mime type, the size and the actual content of the property. The FileProperty is a kind of wrapper that holds only references to the columns via their name.

    The creation of a FileProperty does not create the other properties that hold, e.g. the name of the size. Users of the framework or a UI need to handle the creation of the according properties.

    Inheritance
    System.Object
    DynamicObject
    NamedDynamicObject
    ModelElement
    ModelProperty
    PersistedProperty
    BinaryProperty
    FileProperty
    Implements
    System.Dynamic.IDynamicMetaObjectProvider
    System.ComponentModel.INotifyPropertyChanged
    System.ComponentModel.IDataErrorInfo
    INullable
    Inherited Members
    BinaryProperty.Convert(Object)
    BinaryProperty.ValidateValue(Object, String)
    BinaryProperty.Pack(Object, Byte[])
    BinaryProperty.Unpack(Byte[], Byte[])
    BinaryProperty.MaxStorageSize
    BinaryProperty.StorageType
    BinaryProperty.ContentProcessing
    PersistedProperty.ValidationScript
    PersistedProperty.StorageColumn
    ModelProperty.IsValueAffectedByPropertyChange(EntityObject, String)
    ModelProperty.Accept(ModelElementVisitor)
    ModelProperty.ShallowCopy(String, PersistBehavior, Ownership, Boolean, Boolean)
    ModelProperty.ShallowCopy()
    ModelProperty.OnDeserializing(StreamingContext)
    ModelProperty.Attach(ModelElement)
    ModelProperty.GetHumanReadableMemberPath()
    ModelProperty.InvariantFriendlyTypeName
    ModelProperty.IsNullable
    ModelProperty.IsDefaultDisplayProperty
    ModelProperty.DefaultValueExpression
    ModelProperty.EvaluateDefaultValueExpression
    ModelProperty.HasDefaultValueExpression
    ModelProperty.DefaultValueFunction
    ModelProperty.EvaluateDefaultValueFunction
    ModelProperty.EvaluateDefaultValue
    ModelProperty.DefaultValue
    ModelProperty.Permissions
    ModelProperty.DefaultAggregateFunction
    ModelElement.IsValidIdentifier(String)
    ModelElement.Detach()
    ModelElement.SetOwnershipPrefix(String)
    ModelElement.UpdateChildren(NotifyCollectionChangedEventArgs)
    ModelElement.SetPersistBehavior(PersistBehavior)
    ModelElement.SetName(String)
    ModelElement.SetOwnership(Ownership)
    ModelElement.ElementGuid
    ModelElement.Name
    ModelElement.Parent
    ModelElement.Children
    ModelElement.PersistBehavior
    ModelElement.IsFullPersistBehavior
    ModelElement.IsNonePersistBehavior
    ModelElement.IsSystemElement
    ModelElement.IsApplicationSpecificElement
    ModelElement.IsUserElement
    ModelElement.IsSystemOrApplicationSpecificElement
    ModelElement.InvariantFriendlyName
    ModelElement.CreationVersion
    ModelElement.LastUpdateVersion
    ModelElement.Error
    ModelElement.ErrorSummary
    ModelElement.IsValid
    ModelElement.Ownership
    ModelElement.OwnershipPrefix
    ModelElement.NonPrefixedName
    NamedDynamicObject.OnPropertyChanged(String)
    NamedDynamicObject.PropertyChanged
    DynamicObject.GetMember(String)
    DynamicObject.SetMember(String, Object)
    DynamicObject.GetMetaObject(Expression)
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: TimeCockpit.Data.DataModel
    Assembly: TimeCockpit.Data.dll
    Syntax
    [DataType(typeof(byte[]))]
    [Column(typeof(byte[]), SizePropertyName = "MaxStorageSize")]
    [DefaultValue(new byte[]{})]
    [FriendlyTypeName("Binary")]
    public class FileProperty : BinaryProperty, IDynamicMetaObjectProvider, INotifyPropertyChanged, IDataErrorInfo, INullable

    Constructors

    FileProperty()

    Initializes a new instance of the FileProperty class

    Declaration
    public FileProperty()

    FileProperty(IEnumerable<KeyValuePair<Object, Object>>)

    Initializes a new instance of the FileProperty class

    Declaration
    public FileProperty(IEnumerable<KeyValuePair<object, object>> properties)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Object, System.Object>> properties

    Collection of properties

    FileProperty(FileProperty)

    Initializes a new instance of the FileProperty class.

    Declaration
    public FileProperty(FileProperty element)
    Parameters
    Type Name Description
    FileProperty element

    The element.

    Properties

    AllowedExtensions

    Gets or sets the allowed extensions of the property.

    Declaration
    public IEnumerable<string> AllowedExtensions { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.String>

    AllowedMimeTypes

    Gets or sets the allowed mime types of the property. If more than one mime types are set.

    Declaration
    public IEnumerable<string> AllowedMimeTypes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.String>

    ClrDefaultValue

    Gets the default valud for the datatype for the property.

    Declaration
    public override object ClrDefaultValue { get; }
    Property Value
    Type Description
    System.Object
    Overrides
    BinaryProperty.ClrDefaultValue

    DataType

    Gets the datatype for the property.

    Declaration
    public override Type DataType { get; }
    Property Value
    Type Description
    System.Type
    Overrides
    BinaryProperty.DataType

    FileMimeTypeColumn

    Gets or sets the mime type of the file.

    Declaration
    public string FileMimeTypeColumn { get; set; }
    Property Value
    Type Description
    System.String

    FileNameColumn

    Gets or sets the file name.

    Declaration
    public string FileNameColumn { get; set; }
    Property Value
    Type Description
    System.String

    FileSizeColumn

    Gets or sets the size of the file.

    Declaration
    public string FileSizeColumn { get; set; }
    Property Value
    Type Description
    System.String

    MaxFileSizeInKB

    Gets or sets the maximum file size of the uploaded file

    Declaration
    public long MaxFileSizeInKB { get; set; }
    Property Value
    Type Description
    System.Int64

    Methods

    Validate(ref IList<PropertyValidationMessage>, Boolean)

    Validates a ModelElement according to certain rules.

    Declaration
    protected override void Validate(ref IList<PropertyValidationMessage> messages, bool validateRecursively)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<PropertyValidationMessage> messages

    An list of strings that stores that picks up the validation errors of a model element.

    System.Boolean validateRecursively

    Indicates wheter to validate only the current model element or all its children (recursively) as well.

    Overrides
    BinaryProperty.Validate(ref IList<PropertyValidationMessage>, Boolean)
    Remarks

    The rules the ModelElement is validated against are dependent on the type of ModelElement that is validated. This method can be overridden to provide custom validation behavior for subclasses of ModelElement

    When Validate(ref IList<PropertyValidationMessage>, Boolean) is called on a modelelement, the Validate(ref IList<PropertyValidationMessage>, Boolean) method of all children attatched to the modelelemnt are validated recursivly.

    In This Article
    Back to top Copyright © 2020 software architects gmbh