コード例 #1
0
        protected void ValidateNoSuchServiceFault(FaultException exc)
        {
            bool fault = exc.IsValidOnvifFault("Receiver/ActionNotSupported/NoSuchService");

            SaveStepFault(exc);
            if (fault)
            {
                StepPassed();
            }
            else
            {
                throw exc;
            }
        }
コード例 #2
0
        bool ValidateInvalidTokenFault(FaultException fault, out string reason)
        {
            if (fault == null)
            {
                reason = "No SOAP fault received";
                return(false);
            }

            bool ok = fault.IsValidOnvifFault("Sender/InvalidArgVal/NoSource", out reason);

            if (!ok)
            {
                LogStepEvent("WARNING: fault received is not Sender/InvalidArgVal/NoSource fault.");
            }
            reason = string.Empty;
            return(true);
        }
コード例 #3
0
 bool IsAccessDeniedFault(FaultException ex)
 {
     return(ex.IsValidOnvifFault(OnvifFaults.NotAuthorized) ||
            ex.IsValidOnvifFault(OnvifFaults.SenderNotAuthorized));
 }