コード例 #1
0
        public IWampRegistrationSubscriptionToken Register(IWampRpcOperation operation, RegisterOptions options)
        {
            options = options.WithDefaults();

            MatchRpcOperationCatalog catalog = GetInnerCatalog(options);

            return(catalog.Register(operation, options));
        }
コード例 #2
0
        private MatchRpcOperationCatalog GetInnerCatalog(RegisterOptions options)
        {
            MatchRpcOperationCatalog result =
                mInnerCatalogs.FirstOrDefault
                    (innerCatalog => innerCatalog.Handles(options));

            if (result == null)
            {
                throw new WampException(WampErrors.InvalidOptions,
                                        "unknown match type: " + options.Match);
            }

            return(result);
        }