SGScript.IObjectBase._GetPropFieldInfo C# (CSharp) Method

_GetPropFieldInfo() static private method

static private _GetPropFieldInfo ( MemberInfo minfo, Type type ) : SGSPropInfo
minfo System.Reflection.MemberInfo
type System.Type
return SGSPropInfo
        static SGSPropInfo _GetPropFieldInfo( MemberInfo minfo, Type type )
        {
            SGSPropInfo info = new SGSPropInfo(){ info = minfo, propType = type };
            foreach( object attr in minfo.GetCustomAttributes( false ) )
            {
                if( attr is HideProperty )
                {
                    info.canRead = (attr as HideProperty).CanRead;
                    info.canWrite = (attr as HideProperty).CanWrite;
                    if( info.canRead == false && info.canWrite == false )
                        return null; // no need to register the property, it is marked as inaccessible
                }
            }

            info.parseVarMethod = FindParserForType( type );

            return info;
        }