Pomona.Common.TypeSystem.PropertySpec.OnLoadPropertyFlags C# (CSharp) Method

OnLoadPropertyFlags() protected method

protected OnLoadPropertyFlags ( ) : PropertyFlags
return PropertyFlags
        protected internal virtual PropertyFlags OnLoadPropertyFlags()
        {
            if (PropertyInfo == null)
                throw new InvalidOperationException("Unable to load PropertyFlags when PropertyInfo is null.");

            return (PropertyInfo.CanRead ? PropertyFlags.AllowsFiltering | PropertyFlags.IsReadable : 0) |
                   (PropertyInfo.CanWrite ? PropertyFlags.IsWritable : 0);
        }

Usage Example

Ejemplo n.º 1
0
 public virtual PropertyFlags LoadPropertyFlags(PropertySpec propertySpec)
 {
     if (propertySpec == null)
     {
         throw new ArgumentNullException(nameof(propertySpec));
     }
     return(propertySpec.OnLoadPropertyFlags());
 }
All Usage Examples Of Pomona.Common.TypeSystem.PropertySpec::OnLoadPropertyFlags