示例#1
0
        public IAsyncResult BeginCreateTopic(string serviceNamespace, string issuerName, string issuerSecret, string name, AsyncCallback callback)
        {
            Requires.NotNullOrEmpty(serviceNamespace, "serviceNamespace");
            Requires.NotNullOrEmpty(issuerName, "issuerName");
            Requires.NotNullOrEmpty(issuerSecret, "issuerSecret");
            Requires.NotNullOrEmpty(name, "name");

            TokenProvider credentials = TokenProvider.CreateSharedSecretTokenProvider(serviceNamespace, issuerName, issuerSecret);

            Func <TopicClient> creator = () => CreateTopic(credentials, name);

            return(TopicClient.BeginCreateTopic(name, credentials, callback, creator));
        }