/// <summary> /// 获取单件实例 /// </summary> /// <param name=""></param> /// <returns>链接控制器</returns> /// <memo></memo> public static LinkController GetSingletonPtr() { IntPtr __ptr = CLinkController_getSingletonPtr_CLinkController(); if (__ptr == IntPtr.Zero) { return(null); } LinkController csObj = new LinkController(CreatedWhenConstruct.CWC_NotToCreate); csObj.BindNativeObject(__ptr, "CLinkController"); csObj.Delegate = true; IClassFactory csObjClassFactory = GlobalClassFactoryMap.Get(csObj.GetCppInstanceTypeName()); if (csObjClassFactory != null) { csObj.Delegate = true; csObj = csObjClassFactory.Create() as LinkController; csObj.BindNativeObject(__ptr, "CLinkController"); csObj.Delegate = true; } return(csObj); }
public static LinkController FromBaseObject(BaseObject baseObj) { if (baseObj == null || baseObj.NativeObject == IntPtr.Zero) { return(null); } LinkController obj = baseObj as LinkController; if (object.Equals(obj, null)) { obj = new LinkController(CreatedWhenConstruct.CWC_NotToCreate); obj.BindNativeObject(baseObj.NativeObject, "CLinkController"); obj.IncreaseCast(); } return(obj); }