예제 #1
0
		public DelegateType(Type t)
		{
			this.type = t;
			this.strType = ToLuaExport.GetTypeStr(t);
			if (t.get_IsGenericType())
			{
				this.name = ToLuaExport.GetGenericLibName(t);
			}
			else
			{
				this.name = ToLuaExport.GetTypeStr(t);
				this.name = this.name.Replace(".", "_");
			}
		}
예제 #2
0
        public BindType(Type t)
        {
            type = t;

            name = ToLuaExport.GetTypeStr(t);

            if (t.IsGenericType)
            {
                libName  = ToLuaExport.GetGenericLibName(t);
                wrapName = ToLuaExport.GetGenericLibName(t);
            }
            else
            {
                libName  = t.FullName.Replace("+", ".");
                wrapName = name.Replace('.', '_');

                if (name == "object")
                {
                    wrapName = "System_Object";
                }
            }

            if (t.BaseType != null)
            {
                baseName = ToLuaExport.GetTypeStr(t.BaseType);

                if (baseName == "ValueType")
                {
                    baseName = null;
                }
            }

            if (t.GetConstructor(Type.EmptyTypes) == null && t.IsAbstract && t.IsSealed)
            {
                baseName = null;
                IsStatic = true;
            }
        }