/// <summary> /// 获取命令池 /// </summary> /// <param name=""></param> /// <returns>命令池</returns> /// <memo></memo> public CommandPool GetCommandPool() { IntPtr __ptr = CControlSpace_getCommandPool_CCommandPool(this.NativeObject); if (__ptr == IntPtr.Zero) { return(null); } CommandPool csObj = new CommandPool(CreatedWhenConstruct.CWC_NotToCreate); csObj.BindNativeObject(__ptr, "CCommandPool"); csObj.Delegate = true; IClassFactory csObjClassFactory = GlobalClassFactoryMap.Get(csObj.GetCppInstanceTypeName()); if (csObjClassFactory != null) { csObj.Delegate = true; csObj = csObjClassFactory.Create() as CommandPool; csObj.BindNativeObject(__ptr, "CCommandPool"); csObj.Delegate = true; } return(csObj); }
public static CommandPool FromBaseObject(BaseObject baseObj) { if (baseObj == null || baseObj.NativeObject == IntPtr.Zero) { return(null); } CommandPool obj = baseObj as CommandPool; if (object.Equals(obj, null)) { obj = new CommandPool(CreatedWhenConstruct.CWC_NotToCreate); obj.BindNativeObject(baseObj.NativeObject, "CCommandPool"); obj.IncreaseCast(); } return(obj); }