Esempio n. 1
0
 /// <summary>
 ///     token验证
 /// </summary>
 /// <param name="request"></param>
 /// <param name="channel"></param>
 /// <param name="instanceContext"></param>
 /// <returns></returns>
 public object AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext)
 {
     if (CrossDomainInspector.DealOptions(ref request))
     {
         return("3");
     }
     return(string.Empty);
 }
Esempio n. 2
0
 /// <summary>
 ///     回复内容
 /// </summary>
 /// <param name="reply"></param>
 /// <param name="correlationState"></param>
 public void BeforeSendReply(ref Message reply, object correlationState)
 {
     if ((string)correlationState == "3")
     {
         reply = Message.CreateMessage(OperationContext.Current.IncomingMessageVersion, "OPTIONS");
         CrossDomainInspector.DealNewMessage(ref reply);
     }
     else
     {
         CrossDomainInspector.DealtMessage(ref reply);
     }
 }