Exemplo n.º 1
0
 internal UseLicenseRpcResult(UseLicenseResult originalResult)
 {
     if (originalResult == null)
     {
         throw new ArgumentNullException("originalResult");
     }
     this.EndUseLicense = originalResult.EndUseLicense;
     if (originalResult.Error != null)
     {
         this.isPermanentFailure = originalResult.Error.IsPermanentFailure;
         this.wellKnownErrorCode = originalResult.Error.WellKnownErrorCode;
         this.errorResults       = ErrorResult.GetErrorResultListFromException(originalResult.Error);
     }
 }
Exemplo n.º 2
0
        internal OverallRpcResult(Exception e)
        {
            if (e == null)
            {
                this.status = OverallRpcStatus.Success;
                return;
            }
            RightsManagementServerException ex = e as RightsManagementServerException;

            this.status       = ((ex != null && !ex.IsPermanentFailure) ? OverallRpcStatus.TransientFailure : OverallRpcStatus.PermanentFailure);
            this.errorResults = ErrorResult.GetErrorResultListFromException(e);
            if (ex != null)
            {
                this.wellKnownErrorCode = ex.WellKnownErrorCode;
            }
        }