本文整理汇总了C#中CommandStatus类的典型用法代码示例。如果您正苦于以下问题:C# CommandStatus类的具体用法?C# CommandStatus怎么用?C# CommandStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CommandStatus类属于命名空间,在下文中一共展示了CommandStatus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Dispose
public void Dispose()
{
if (dest == null) return;
if (attacking == true && attacktask != null) attacktask.Deactivate();
attacktask = null;
this.status = CommandStatus.FINISHED;
}
示例2: Insert
/// <summary> Called to save a pdu into the database </summary>
/// <param name="dataTransaction"></param>
/// <param name="logKey"></param>
/// <param name="smscServiceId"></param>
/// <param name="pduDirectionType"></param>
/// <param name="commandLength"></param>
/// <param name="commandSet"></param>
/// <param name="commandStatus"></param>
/// <param name="sequenceNumber"></param>
/// <param name="details"></param>
/// <param name="pduDataBlocks"></param>
/// <returns> long </returns>
public static Guid? Insert(DataTransaction dataTransaction, string logKey, int smscServiceId, PduDirectionTypes pduDirectionType, long commandLength,
CommandSet commandSet, CommandStatus commandStatus, long sequenceNumber, List<PduPropertyDetail> details, List<byte[]> pduDataBlocks)
{
Guid? pduHeaderId = null;
// Prepare the database call
using (DbCommand dbCommand = dataTransaction.GetStoredProcCommand("spSMPP_Pdu_Insert"))
{
// Prepare the call
dataTransaction.AddInParameterString(dbCommand, "LogKey", logKey);
dataTransaction.AddInParameterInteger(dbCommand, "SMSCServiceID", smscServiceId);
dataTransaction.AddInParameterShort(dbCommand, "Direction", (short) pduDirectionType);
dataTransaction.AddInParameterLong(dbCommand, "CommandLength", commandLength);
dataTransaction.AddInParameterString(dbCommand, "CommandId", commandSet.ToString());
dataTransaction.AddInParameterString(dbCommand, "CommandStatusId", commandStatus.ToString());
dataTransaction.AddInParameterLong(dbCommand, "SequenceNumber", sequenceNumber);
dataTransaction.AddInParameterTable(dbCommand, "PduPropertyDetails", new PduPropertyDetails(details));
dataTransaction.AddInParameterTable(dbCommand, "PduDataBlocks", new SMSCPduDataBlocks(pduDataBlocks));
dataTransaction.AddOutParameterGuid(dbCommand, "PduHeaderId");
dataTransaction.ExecuteNonQuery(dbCommand);
pduHeaderId = dataTransaction.GetParameterValueGuid(dbCommand, "PduHeaderId");
}
return pduHeaderId;
}
示例3: GetCommandStatus
public CommandStatusResult GetCommandStatus(IImmutableSet<IProjectTree> nodes, long commandId, bool focused, string commandText, CommandStatus progressiveStatus) {
if ((VSConstants.VSStd2KCmdID)commandId == VSConstants.VSStd2KCmdID.EXCLUDEFROMPROJECT && nodes != null && nodes.Count > 0) {
return new CommandStatusResult(true, commandText, CommandStatus.NotSupported | CommandStatus.Invisible);
}
return CommandStatusResult.Unhandled;
}
示例4: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
if(!String.IsNullOrEmpty(Request["userName"])
&& !String.IsNullOrEmpty(Request["Id"]))
{
string userName = Request["userName"];
string authorizationKey = Request["Id"];
CommandStatus status = new CommandStatus();
new UserService().AuthorizeUser(userName, authorizationKey, status);
if (status.IsError == false)
{
//User u = new UserService().GetByLogin(userName);
//Seppuku.Domain.Kingdom k = new KingdomService().GetByUserId(u.UserId);
//new MapService().InitializeKingdom(k.MapId, k.KingdomId);
LblResult.Text = "Twoje konto zostało aktywowane. Możesz zalogować się na stronę.";
}
else switch (status.Message)
{
case "Invalid UserName":
LblResult.Text = "Link aktywacyjny niepoprawny. Błędna nazwa użytkownika";
break;
case "Invalid Authentication Key":
LblResult.Text = "Link aktywacyjny niepoprawny. Błędny klucz aktywacyjny";
break;
case "Already Approved":
LblResult.Text = "Użytkownik został już wcześniej aktywowany. Możesz zalogować się na swoje konto";
break;
}
}
}
}
示例5: GetCommandStatusAsync
public Task<CommandStatusResult> GetCommandStatusAsync(IImmutableSet<IProjectTree> nodes, long commandId, bool focused, string commandText, CommandStatus progressiveStatus) {
var workflow = _interactiveWorkflowProvider.GetOrCreate();
if (commandId == RPackageCommandId.icmdCopyRemoteItemPath && nodes.IsSingleNodePath() && workflow.RSession.IsHostRunning && workflow.RSession.IsRemote) {
return Task.FromResult(new CommandStatusResult(true, commandText, CommandStatus.Enabled | CommandStatus.Supported));
}
return Task.FromResult(CommandStatusResult.Unhandled);
}
示例6: CommandResult
/// <summary>Parameterized constructor.
/// </summary>
public CommandResult(CommandStatus status, string commandId, string exceptionTypeName, string errorMessage, IDictionary errorData)
{
this.Status = status;
this.CommandId = commandId;
this.ExceptionTypeName = exceptionTypeName;
this.ErrorMessage = errorMessage;
this.ErrorData = errorData;
}
示例7: GetCommandStatus
public CommandStatusResult GetCommandStatus(IImmutableSet<IProjectTree> nodes, long commandId, bool focused, string commandText, CommandStatus progressiveStatus) {
if (commandId == RPackageCommandId.icmdSetDirectoryHere && nodes.Count == 1) {
var session = _interactiveWorkflowProvider.Active?.RSession;
bool enabled = session != null && session.IsHostRunning && !session.IsRemote;
return new CommandStatusResult(true, commandText, enabled ? CommandStatus.Enabled | CommandStatus.Supported : CommandStatus.Supported);
}
return CommandStatusResult.Unhandled;
}
示例8: CommandResult
/// <summary>Parameterized constructor.
/// </summary>
public CommandResult(CommandStatus commandStatus, string commandId, string aggregateRootId, int exceptionCode, string errorMessage)
{
Status = commandStatus;
CommandId = commandId;
AggregateRootId = aggregateRootId;
ExceptionCode = exceptionCode;
ErrorMessage = errorMessage;
}
示例9: CommandResult
/// <summary>Parameterized constructor.
/// </summary>
public CommandResult(CommandStatus status, string commandId, string aggregateRootId, string result = null, string resultType = null)
{
Status = status;
CommandId = commandId;
AggregateRootId = aggregateRootId;
Result = result;
ResultType = resultType;
}
示例10: CommandResult
/// <summary>Parameterized constructor.
/// </summary>
public CommandResult(CommandStatus status, string commandId, string aggregateRootId, string exceptionTypeName, string errorMessage)
{
Status = status;
CommandId = commandId;
AggregateRootId = aggregateRootId;
ExceptionTypeName = exceptionTypeName;
ErrorMessage = errorMessage;
}
示例11: GenericNackSm
/// <summary> Constructor </summary>
/// <param name="defaultEncoding"></param>
/// <param name="status"></param>
/// <param name="sequence"></param>
private GenericNackSm(DataCodings defaultEncoding, CommandStatus status, uint sequence)
: base(defaultEncoding)
{
Length = (uint) Header.HEADER_LENGTH;
Command = CommandSet.GenericNack;
Status = status;
Sequence = sequence;
}
示例12: SubmitMultiSmResp
/// <summary> Constructor </summary>
/// <param name="defaultEncoding"></param>
/// <param name="commandStatus"></param>
/// <param name="sequence"></param>
/// <param name="messageId"></param>
private SubmitMultiSmResp(DataCodings defaultEncoding, CommandStatus commandStatus, uint sequence, string messageId)
: base(defaultEncoding, CommandSet.SubmitMultiSmResp, commandStatus, sequence)
{
MessageId = messageId;
UnsuccessDestinationAddresses = new List<UnsuccessDestinationAddress>();
Optional = new TLVCollection();
}
示例13: Or
public static CommandStatus Or(this CommandStatus status1, CommandStatus status2)
{
if (status1 == CommandStatus.Normal || status2 == CommandStatus.Normal)
return CommandStatus.Normal;
if (status1 == CommandStatus.Disabled || status2 == CommandStatus.Disabled)
return CommandStatus.Disabled;
return CommandStatus.Unavailable;
}
示例14: Create
/// <summary> Called to create a DataSmResp object </summary>
/// <param name="defaultEncoding"></param>
/// <param name="dataSm"></param>
/// <param name="commandStatus"></param>
/// <param name="messageId"></param>
/// <returns> DataSmResp </returns>
public static DataSmResp Create(DataCodings defaultEncoding, DataSm dataSm, CommandStatus commandStatus, string messageId)
{
if (dataSm.SourceAddr == string.Empty || dataSm.SourceAddr == null)
{
commandStatus = CommandStatus.ESME_RINVSRCADR;
}
return new DataSmResp(defaultEncoding, commandStatus, dataSm.Sequence, messageId);
}
示例15: Create
/// <summary> Called to create a DataSmResp object </summary>
/// <param name="defaultEncoding"></param>
/// <param name="submitSm"></param>
/// <param name="commandStatus"></param>
/// <param name="messageId"></param>
/// <returns> DataSmResp </returns>
public static SubmitSmResp Create(DataCodings defaultEncoding, SubmitSm submitSm, CommandStatus commandStatus, string messageId)
{
if (submitSm.DestAddr == string.Empty || submitSm.DestAddr == null)
{
commandStatus = CommandStatus.ESME_RINVDSTADR;
}
return new SubmitSmResp(defaultEncoding, commandStatus, submitSm.Sequence, messageId);
}