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

OnLoadDeclaringType() protected method

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

            var decType = PropertyInfo.DeclaringType;
            return decType != null ? TypeResolver.FromType(decType) : null;
        }

Usage Example

Ejemplo n.º 1
0
        public virtual TypeSpec LoadDeclaringType(PropertySpec propertySpec)
        {
            if (propertySpec == null)
            {
                throw new ArgumentNullException(nameof(propertySpec));
            }

            return(propertySpec.OnLoadDeclaringType());
        }
All Usage Examples Of Pomona.Common.TypeSystem.PropertySpec::OnLoadDeclaringType