예제 #1
0
 public bool CanPublish(PublishOptions options, string topicUri)
 {
     if (WampRestrictedUris.IsRestrictedUri(topicUri))
     {
         throw new WampException(WampErrors.InvalidUri,
                                 $"publish with restricted topic URI '{topicUri}'");
     }
     else
     {
         return(Authorizer.CanPublish(options, topicUri));
     }
 }
예제 #2
0
 public bool CanRegister(RegisterOptions options, string procedure)
 {
     if (WampRestrictedUris.IsRestrictedUri(procedure))
     {
         throw new WampException(WampErrors.InvalidUri,
                                 $"register for restricted procedure URI '{procedure}'");
     }
     else
     {
         return(Authorizer.CanRegister(options, procedure));
     }
 }