public void AddPubSubPermission(WampPubSubPermissions pubSubPermission) { if (pubSubPermission.prefix) { mPubSubPrefixPermissions.Add(pubSubPermission); } else { mPubSubPermissions[pubSubPermission.uri] = pubSubPermission; } }
public void Publish(IWampClient client, string topicUri, TMessage @event) { string resolvedTopicUri = ResolveUri(client, topicUri); WampCraAuthenticator <TMessage> wampAuth = GetOrCreateWampAuthenticatorForClient(client); if (wampAuth.IsAuthenticated) { WampPubSubPermissions pubSubPerm = wampAuth.CraPermissionsMapper.LookupPubSubPermissions(resolvedTopicUri); if (pubSubPerm != null && pubSubPerm.pub) { mPubSubServer.Publish(client, resolvedTopicUri, @event); } } }