Example #1
0
                protected IntPtr EarthView_World_Core_CTcpServer_createJob_CBaseTcpServerJob_Function()
                {
                    EarthView.World.Core.BaseTcpServerJob csret = CreateJob();

                    if (!object.Equals(csret, null))
                    {
                        csret.Delegate = true;
                        return(csret.NativeObject);
                    }
                    else
                    {
                        return(IntPtr.Zero);
                    }
                }
Example #2
0
                /// <summary>
                /// 虚函数,主要用于用户自己去实例化,创建新的线程
                /// </summary>
                /// <returns></returns>
                protected virtual EarthView.World.Core.BaseTcpServerJob CreateJob()
                {
                    IntPtr __ptr = EarthView_World_Core_CTcpServer_createJob_CBaseTcpServerJob(this.NativeObject);

                    if (__ptr == IntPtr.Zero)
                    {
                        return(null);
                    }
                    EarthView.World.Core.BaseTcpServerJob csObj = new EarthView.World.Core.BaseTcpServerJob(CreatedWhenConstruct.CWC_NotToCreate);
                    csObj.BindNativeObject(__ptr, "CBaseTcpServerJob");
                    csObj.Delegate = true;
                    IClassFactory csObjClassFactory = GlobalClassFactoryMap.Get(csObj.GetCppInstanceTypeName());

                    if (csObjClassFactory != null)
                    {
                        csObj.Delegate = true;
                        csObj          = csObjClassFactory.Create() as EarthView.World.Core.BaseTcpServerJob;
                        csObj.BindNativeObject(__ptr, "CBaseTcpServerJob");
                        csObj.Delegate = true;
                    }
                    return(csObj);
                }