Esempio n. 1
0
    public bool IsPropertyReadonly(ModifiableEntity modifiableEntity)
    {
        if (modifiableEntity.IsPropertyReadonly(this.PropertyInfo))
        {
            return(true);
        }

        if (Validator.GlobalIsReadonly != null)
        {
            foreach (var f in Validator.GlobalIsReadonly.GetInvocationListTyped())
            {
                if (f(modifiableEntity, PropertyInfo))
                {
                    return(true);
                }
            }
        }

        if (this.PropertyInfo.CanWrite == false)
        {
            return(true);
        }

        return(false);
    }