本文整理汇总了C#中IQueue.GetLandingPageUrl方法的典型用法代码示例。如果您正苦于以下问题:C# IQueue.GetLandingPageUrl方法的具体用法?C# IQueue.GetLandingPageUrl怎么用?C# IQueue.GetLandingPageUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IQueue
的用法示例。
在下文中一共展示了IQueue.GetLandingPageUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ValidateRequest
private static IValidateResult ValidateRequest(
IQueue queue,
bool sslEnabled,
bool includeTargetUrl,
string targetUrl,
string domainAlias,
CultureInfo language = null,
string layoutName = null)
{
IValidateResult sessionObject = _validationResultProviderFactory.Invoke().GetValidationResult(queue);
if (sessionObject != null)
{
AcceptedConfirmedResult confirmedResult = sessionObject as AcceptedConfirmedResult;
if (confirmedResult != null)
return new AcceptedConfirmedResult(queue, confirmedResult.KnownUser, false);
return sessionObject;
}
try
{
IKnownUser knownUser = KnownUserFactory.VerifyMd5Hash();
if (knownUser == null)
{
string landingPageUrl = queue.GetLandingPageUrl(includeTargetUrl);
if (landingPageUrl != null)
return new EnqueueResult(queue, landingPageUrl);
if (targetUrl != null)
return new EnqueueResult(queue, queue.GetQueueUrl(targetUrl, sslEnabled, domainAlias, language, layoutName));
return new EnqueueResult(queue, queue.GetQueueUrl(includeTargetUrl, sslEnabled, domainAlias, language, layoutName));
}
if (_defaultTicketExpiration != default(TimeSpan) && knownUser.TimeStamp <= DateTime.UtcNow.Subtract(_defaultTicketExpiration))
{
throw new ExpiredValidationException(queue, knownUser);
}
AcceptedConfirmedResult result = new AcceptedConfirmedResult(queue, knownUser, true);
_validationResultProviderFactory.Invoke().SetValidationResult(queue, result);
return result;
}
catch (InvalidKnownUserUrlException ex)
{
throw new KnownUserValidationException(ex, queue);
}
catch (InvalidKnownUserHashException ex)
{
throw new KnownUserValidationException(ex, queue);
}
}