Habanero.Smooth.ManyToOneAutoMapper.MustBeMapped C# (CSharp) Method

MustBeMapped() public method

Determines whether this Property Info must be mapped based on Its AutoMapping Attributes.
public MustBeMapped ( ) : bool
return bool
        public bool MustBeMapped()
        {
            if (this.PropertyWrapper.IsStatic) return false;
            if (!this.PropertyWrapper.IsPublic) return false;
            if (this.PropertyWrapper.IsInherited) return false;
            if (this.PropertyWrapper.HasMultipleReverseRelationship
                    && this.PropertyWrapper.HasSingleReverseRelationship
                    && !this.PropertyWrapper.HasOneToOneAttribute
                    && !this.PropertyWrapper.HasManyToOneAttribute)
            {
                throw new InvalidDefinitionException("The Relationship '" + this.PropertyWrapper.Name
                        + "' could not be automapped since there are multiple relationships on class '"
                        + this.PropertyWrapper.PropertyType.Name + "' that reference the BusinessObject Class '"
                        + this.PropertyWrapper.DeclaringClassName + "'. Please map using ClassDef.XML or Attributes");
            }
            if (this.PropertyWrapper.HasManyToOneAttribute) return true;

            if (!this.PropertyWrapper.IsSingleRelationship
                    || this.PropertyWrapper.HasIgnoreAttribute
                    || this.PropertyWrapper.HasOneToOneAttribute)
            {
                return false;
            }
            return !this.PropertyWrapper.HasSingleReverseRelationship;
        }