当前位置: 首页>>代码示例>>C#>>正文


C# ResultCode类代码示例

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


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


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