• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ResultCode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ResultCode的典型用法代码示例。如果您正苦于以下问题:C# ResultCode类的具体用法?C# ResultCode怎么用?C# ResultCode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ResultCode类属于命名空间,在下文中一共展示了ResultCode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OAuthResult

 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="result">the result code</param>
 public OAuthResult(ResultCode result)
 {
     Error = null;
     AuthResponse = null;
     SessionToken = null;
     Result = result;
 }
开发者ID:secondsun,项目名称:fh-dotnet-sdk,代码行数:11,代码来源:IOAuthClientHandlerService.cs


示例2: GetMsg

		static string GetMsg (ResultCode code)
		{
			switch (code) {
			case ResultCode.Ok:
				return "Success";
			case ResultCode.Denied:
				return "Access denied";
			case ResultCode.NoKeyringDaemon:
				return "The keyring daemon is not available";
			case ResultCode.AlreadyUnlocked:
				return "Keyring was already unlocked";
			case ResultCode.NoSuchKeyring:
				return "No such keyring";
			case ResultCode.BadArguments:
				return "Bad arguments";
			case ResultCode.IOError:
				return "I/O error";
			case ResultCode.Cancelled:
				return "Operation canceled";
			case ResultCode.AlreadyExists:
				return "Item already exists";
			default:
				return "Unknown error";
			}
		}
开发者ID:casperbiering,项目名称:gnome-keyring-sharp,代码行数:25,代码来源:KeyringException.cs


示例3: VlvResponseControl

 internal VlvResponseControl(int targetPosition, int count, byte[] context, ResultCode result, bool criticality, byte[] value) : base("2.16.840.1.113730.3.4.10", value, criticality, true)
 {
     this.position = targetPosition;
     this.count = count;
     this.context = context;
     this.result = result;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:VlvResponseControl.cs


示例4: OAuthResult

 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="result">the result code</param>
 /// <param name="exception">the error exception</param>
 public OAuthResult(ResultCode result, Exception exception)
 {
     AuthResponse = null;
     SessionToken = null;
     Result = result;
     Error = exception;
 }
开发者ID:corinnekrych,项目名称:fh-dotnet-sdk,代码行数:12,代码来源:IOAuthClientHandlerService.cs


示例5: CreateBindResponse

 /// <summary>
 /// Creates a BindResponse for normal bindings and SASL bindings.
 /// </summary>
 /// <param name="context">The user context which contains message ID.</param>
 /// <param name="resultCode">Result code of previous request, as specified in RFC 2251.</param>
 /// <param name="matchedDn">Matched DN. Required, but can be an empty string.</param>
 /// <param name="errorMessage">Error message for result code. Required.</param>
 /// <param name="referral">Referral. Optional and for LDAP v3 only.</param>
 /// <param name="serverCredentials">Server credentials, optional for normal bind.</param>
 /// <returns>The packet that contains the response.</returns>
 internal abstract AdtsBindResponsePacket CreateBindResponse(
     AdtsLdapContext context,
     ResultCode resultCode,
     string matchedDn,
     string errorMessage,
     string[] referral,
     byte[] serverCredentials);
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:17,代码来源:AdtsLdapEncoder.cs


示例6: IsResultCode

 internal static bool IsResultCode(ResultCode code)
 {
     if ((code < ResultCode.Success) || (code > ResultCode.SaslBindInProgress))
     {
         if ((code >= ResultCode.NoSuchAttribute) && (code <= ResultCode.InvalidAttributeSyntax))
         {
             return true;
         }
         if ((code >= ResultCode.NoSuchObject) && (code <= ResultCode.InvalidDNSyntax))
         {
             return true;
         }
         if ((code >= ResultCode.InsufficientAccessRights) && (code <= ResultCode.LoopDetect))
         {
             return true;
         }
         if ((code >= ResultCode.NamingViolation) && (code <= ResultCode.AffectsMultipleDsas))
         {
             return true;
         }
         if ((((code != ResultCode.AliasDereferencingProblem) && (code != ResultCode.InappropriateAuthentication)) && ((code != ResultCode.SortControlMissing) && (code != ResultCode.OffsetRangeError))) && ((code != ResultCode.VirtualListViewError) && (code != ResultCode.Other)))
         {
             return false;
         }
     }
     return true;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:27,代码来源:Utility.cs


示例7: DatatypeR2FormatterGraphResult

 /// <summary>
 /// Datatype formatter graph result
 /// </summary>
 internal DatatypeR2FormatterGraphResult(ResultCode code, IResultDetail[] details, bool validateConformance) : this(validateConformance)
 {
     this.Code = code;
     if (details != null)
         this.m_details = new List<IResultDetail>(details);
     else
         this.m_details = new List<IResultDetail>(10);
 }
开发者ID:oneminot,项目名称:everest,代码行数:11,代码来源:DatatypeFormatterGraphResult.cs


示例8: RiakResult

 /// <summary>
 /// Initializes a new instance of the <see cref="RiakResult"/> class.
 /// </summary>
 /// <param name="resultCode">The <see cref="ResultCode"/>.</param>
 /// <param name="exception">The <see cref="System.Exception"/>. Required.</param>
 public RiakResult(ResultCode resultCode, Exception exception)
     : this(false, resultCode, exception, null, false)
 {
     if (exception == null)
     {
         throw new ArgumentNullException("exception");
     }
 }
开发者ID:basho,项目名称:riak-dotnet-client,代码行数:13,代码来源:RiakResult.cs


示例9: DirectoryResponse

 internal DirectoryResponse(string dn, DirectoryControl[] controls, ResultCode result, string message, Uri[] referral)
 {
     this.dn = dn;
     this.directoryControls = controls;
     this.result = result;
     this.directoryMessage = message;
     this.directoryReferral = referral;
 }
开发者ID:chcosta,项目名称:corefx,代码行数:8,代码来源:DirectoryResponse.cs


示例10: XmlIts1FormatterGraphResult

 /// <summary>
 /// Datatype formatter graph result
 /// </summary>
 internal XmlIts1FormatterGraphResult(ResultCode code, IResultDetail[] details)
 {
     this.Code = code;
     if (details == null)
         this.m_details = new List<IResultDetail>(10);
     else
         this.m_details = new List<IResultDetail>(details);
 }
开发者ID:oneminot,项目名称:everest,代码行数:11,代码来源:XmlIts1FormatterResult.cs


示例11: Error

 public static RiakResult Error(ResultCode code, string message = null)
 {
     return new RiakResult
     {
         IsSuccess = false,
         ResultCode = code,
         ErrorMessage = message
     };
 }
开发者ID:remotex,项目名称:CorrugatedIron,代码行数:9,代码来源:RiakResult.cs


示例12: VlvResponseControl

		internal VlvResponseControl (int contentCount, byte [] contextId, ResultCode result, int targetPosition)
			: base (null, null, false, true)
		{
			throw new NotImplementedException ("ctor-chain");

			ContentCount = contentCount;
			ContextId = contextId;
			Result = result;
			TargetPosition = targetPosition;
		}
开发者ID:carrie901,项目名称:mono,代码行数:10,代码来源:VlvResponseControl.cs


示例13: ADResponse

		public ADResponse(string dn, DirectoryControl[] controls, ResultCode result, string message, Uri[] referral)
		{
			this._result = ResultCode.OperationsError | ResultCode.ProtocolError | ResultCode.TimeLimitExceeded | ResultCode.SizeLimitExceeded | ResultCode.CompareFalse | ResultCode.CompareTrue | ResultCode.AuthMethodNotSupported | ResultCode.StrongAuthRequired | ResultCode.ReferralV2 | ResultCode.Referral | ResultCode.AdminLimitExceeded | ResultCode.UnavailableCriticalExtension | ResultCode.ConfidentialityRequired | ResultCode.SaslBindInProgress | ResultCode.NoSuchAttribute | ResultCode.UndefinedAttributeType | ResultCode.InappropriateMatching | ResultCode.ConstraintViolation | ResultCode.AttributeOrValueExists | ResultCode.InvalidAttributeSyntax | ResultCode.NoSuchObject | ResultCode.AliasProblem | ResultCode.InvalidDNSyntax | ResultCode.AliasDereferencingProblem | ResultCode.InappropriateAuthentication | ResultCode.InsufficientAccessRights | ResultCode.Busy | ResultCode.Unavailable | ResultCode.UnwillingToPerform | ResultCode.LoopDetect | ResultCode.SortControlMissing | ResultCode.OffsetRangeError | ResultCode.NamingViolation | ResultCode.ObjectClassViolation | ResultCode.NotAllowedOnNonLeaf | ResultCode.NotAllowedOnRdn | ResultCode.EntryAlreadyExists | ResultCode.ObjectClassModificationsProhibited | ResultCode.ResultsTooLarge | ResultCode.AffectsMultipleDsas | ResultCode.VirtualListViewError | ResultCode.Other;
			this._dn = dn;
			this._controls = controls;
			ADResponse.TransformControls(this._controls);
			this._result = result;
			this._message = message;
			this._referral = referral;
		}
开发者ID:nickchal,项目名称:pash,代码行数:10,代码来源:ADResponse.cs


示例14: Error

 internal static RiakResult Error(ResultCode code, string message, bool nodeOffline)
 {
     return new RiakResult
     {
         IsSuccess = false,
         ResultCode = code,
         ErrorMessage = message,
         NodeOffline = nodeOffline
     };
 }
开发者ID:eakova,项目名称:CorrugatedIron,代码行数:10,代码来源:RiakResult.cs


示例15: RiakResult

        protected RiakResult(bool isSuccess, ResultCode resultCode, Exception exception, string errorMessage)
        {
            this.isSuccess = isSuccess;
            this.resultCode = resultCode;
            this.exception = exception;
            this.errorMessage = errorMessage;

            if (string.IsNullOrWhiteSpace(this.errorMessage) &&
                exception != null &&
                !string.IsNullOrWhiteSpace(exception.Message))
            {
                this.errorMessage = exception.Message;
            }
        }
开发者ID:josephjeganathan,项目名称:riak-dotnet-client,代码行数:14,代码来源:RiakResult.cs


示例16: OnClicked

    protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
    {
      base.OnClicked(controlId, control, actionType);
      if (control == btnOk)
      {
        PageDestroy();
        resultCode = ResultCode.Close;
        return;
      }
      if (control == btnNextItem)
      {
        PageDestroy();
        resultCode = ResultCode.Next;
        return;
      }
      if (control == btnPreviousItem)
      {
        PageDestroy();
        resultCode = ResultCode.Previous;
        return;
      }
      if (control == btnPlay)
      {
        Log.Info("DialogSetRating:Play:{0}", FileName);
        g_Player.Play(FileName);
      }

      if (control == btnMin)
      {
        if (rating >= 1)
        {
          rating--;
        }
        UpdateRating();
        return;
      }
      if (control == btnPlus)
      {
        if (rating < 5)
        {
          rating++;
        }
        UpdateRating();
        return;
      }
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:46,代码来源:GUIDialogSetRating.cs


示例17: GetDescription

 /// <summary>
 /// 获取命令返回结果的文字描述
 /// </summary>
 /// <param name="result"></param>
 /// <returns></returns>
 public static string GetDescription(ResultCode result)
 {
     switch (result)
     {
         case ResultCode.CannotConnectServer:
             return Resource1.ResultCode_CannotConnectServer;
         case ResultCode.Fail:
             return Resource1.ResultCode_Fail;
         case ResultCode.NoRecord:
             return Resource1.ResultCode_NoRecord;
         case ResultCode.SaveDataError:
             return Resource1.ResultCode_SaveDataError;
         case ResultCode.Successful:
             return Resource1.ResultCode_Successfull;
         default:
             return Resource1.ResultCode_Fail;
     }
 }
开发者ID:chendeben,项目名称:508-Attendance,代码行数:23,代码来源:ResultCodeDecription.cs


示例18: Cancel

    // YOUR CANCEL CODE HERE
    private void Cancel(string strId, ref ResultCode iCode, ref string strDescription)
    {
        MySqlCommand					oCommand;

        // Code example

        // Canceling payment
        oCommand = new MySqlCommand("UPDATE `" + m_Config.m_dbPaymentsTable + "` SET `canceled` = \"1\", `date_cancel` = NOW() WHERE `invoice` = @Id", m_Connect);
        oCommand.Prepare();
        oCommand.Parameters.AddWithValue("@Id", strId);
        // performing query
        if(oCommand.ExecuteNonQuery() > 0)
        {
            iCode = ResultCode.SUCCESS;
            strDescription = "OK";
        }
        else
        {
            iCode = ResultCode.CANCEL_NOT_FOUND;
            strDescription = "Payment with given ID does not exist";
        }
    }
开发者ID:timurns,项目名称:Xsolla-Payment-API,代码行数:23,代码来源:standart.protocol.implementation_en_aspx.aspx.cs


示例19: ADAddResponse

		public ADAddResponse(string dn, DirectoryControl[] controls, ResultCode result, string message) : base(dn, controls, result, message, null)
		{
		}
开发者ID:nickchal,项目名称:pash,代码行数:3,代码来源:ADAddResponse.cs


示例20: AsqResponseControl

		internal AsqResponseControl (ResultCode result)
			: base (null, null, false, false)
		{
			Result = result;
			throw new NotImplementedException ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:6,代码来源:AsqResponseControl.cs



注:本文中的ResultCode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ResultOperatorBase类代码示例发布时间:2022-05-24
下一篇:
C# ResultClass类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap