Search Results for

    Show / Hide Table of Contents

    Class FormulaDefaultValueOnNewAttribute

    Indicates this property has a formula that when evaluated provides a default value that should be initialized whenever a new instance of this item is created

    Inheritance
    object
    Attribute
    DefaultValueOnNewAttribute
    FormulaDefaultValueOnNewAttribute
    Inherited Members
    DefaultValueOnNewAttribute._defaultValue
    DefaultValueOnNewAttribute.SetValue(string)
    DefaultValueOnNewAttribute.UpdateNewValue(object, object, string)
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.Equals(object)
    Attribute.GetHashCode()
    Attribute.Match(object)
    Attribute.IsDefaultAttribute()
    Attribute.TypeId
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: LemonEdge.API.Attributes
    Assembly: LemonEdge.API.dll
    Syntax
    [AttributeUsage(AttributeTargets.Property)]
    public class FormulaDefaultValueOnNewAttribute : DefaultValueOnNewAttribute

    Constructors

    FormulaDefaultValueOnNewAttribute(string)

    Creates a new DefaultValueOnNewAttribute with the specified formula value

    Declaration
    public FormulaDefaultValueOnNewAttribute(string value)
    Parameters
    Type Name Description
    string value

    The default formula value to always evaluate and use

    Methods

    GetDefaultValue(Type, string)

    Declaration
    public override object GetDefaultValue(Type entityType, string propNameToDefault)
    Parameters
    Type Name Description
    Type entityType
    string propNameToDefault
    Returns
    Type Description
    object
    Overrides
    DefaultValueOnNewAttribute.GetDefaultValue(Type, string)

    UpdateNewItem(UserInfo, IReadOnlyCache, IEntityUpdater, object, string)

    Given a new instance of this item this updates the specified property with the stored hard coded value or by evaluating the formula

    Declaration
    public override Task UpdateNewItem(UserInfo user, IReadOnlyCache cache, IEntityUpdater updater, object item, string propNameToDefault)
    Parameters
    Type Name Description
    UserInfo user

    The current user that created this new item

    IReadOnlyCache cache
    IEntityUpdater updater
    object item

    The new item that has a default value to be evaluated and created

    string propNameToDefault

    The property to be updated with the default value

    Returns
    Type Description
    Task

    A task indicating completion of this operation. Can take time if the value is a formula that requires evaluation

    Overrides
    DefaultValueOnNewAttribute.UpdateNewItem(UserInfo, IReadOnlyCache, IEntityUpdater, object, string)

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.