public DocumentObjectCommandBase(string modelName, CommandTargetType target, string objectName, string description, string notes) : base(modelName) { m_description = description; m_notes = notes; m_objectName = objectName; }
public void DoReturnCommand(Iocp.NetConnection conn, CommandTargetType target) { switch (target) { case CommandTargetType.DefaultType: PkgType = PackageType.PKGT_Return; break; case CommandTargetType.Planes: PkgType = PackageType.PKGT_C2P_Return; break; } SendBuffer(conn); }
public RPCWaitHandle WaitDoCommand(Iocp.NetConnection conn, CommandTargetType target, System.Diagnostics.StackTrace st) { //其实这里有很微弱的多线程问题,后面如果设置delegate的时候,网络已经返回的话,不过这个情况应该基本不可能发生 switch (target) { case CommandTargetType.DefaultType: PkgType = PackageType.PKGT_SendAndWait; break; case CommandTargetType.Planes: PkgType = PackageType.PKGT_C2P_SendAndWait; break; } if (RPCManager == null) { RPCManager = RPCNetworkMgr.Instance; } RPCWaitHandle handle = RPCManager.NewWaitHandle(st); SerialId = handle.CallID; SendBuffer(conn); return(handle); }
/// <summary> /// Create a single target /// </summary> /// <param name="type">The type of the target</param> /// <param name="id">The id of the target</param> public CommandTarget(CommandTargetType type, int id) { Type = type; From = id; To = id; }
/// <summary> /// Create a new range /// </summary> /// <param name="type">The type of the range</param> /// <param name="from">The inclusive start id</param> /// <param name="to">The inclusive end id</param> public CommandTarget(CommandTargetType type, int from, int to) { Type = type; To = to; From = from; }