SGScript.IObjectBase.GetStaticClassInfo C# (CSharp) Method

GetStaticClassInfo() public static method

public static GetStaticClassInfo ( Context ctx, Type type ) : SGSClassInfo
ctx Context
type System.Type
return SGSClassInfo
        public static SGSClassInfo GetStaticClassInfo( Context ctx, Type type )
        {
            SGSClassInfo cinfo;
            if( ctx.GetEngine()._sgsStaticClassInfo.TryGetValue( type, out cinfo ) )
                return cinfo;

            NI.OC_Self d_destruct, d_getindex, d_setindex;
            NI.ObjInterface oi = new NI.ObjInterface()
            {
                destruct = d_destruct = new NI.OC_Self( _sgsDestruct ),
                getindex = d_getindex = new NI.OC_Self( _sgsGetIndex ),
                setindex = d_setindex = new NI.OC_Self( _sgsSetIndex ),
            };

            cinfo = new SGSClassInfo()
            {
                iface = AllocInterface( oi, type.Name + "[static]" ),
                props = _ReadClassProps( ctx, type, true ),
                d_destruct = d_destruct,
                d_getindex = d_getindex,
                d_setindex = d_setindex,
            };
            ctx.GetEngine()._sgsStaticClassInfo.Add( type, cinfo );
            return cinfo;
        }