IronPigeon.Relay.Controllers.InboxController.InboxController C# (CSharp) Method

InboxController() public method

Initializes a new instance of the InboxController class.
public InboxController ( string containerName, string tableName, string cloudConfigurationName, HttpMessageHandler httpHandler = null ) : System
containerName string Name of the blob container.
tableName string Name of the table.
cloudConfigurationName string Name of the cloud configuration.
httpHandler System.Net.Http.HttpMessageHandler The HTTP handler to use for outgoing HTTP requests.
return System
        public InboxController(string containerName, string tableName, string cloudConfigurationName, HttpMessageHandler httpHandler = null)
        {
            Requires.NotNullOrEmpty(containerName, "containerName");
            Requires.NotNullOrEmpty(cloudConfigurationName, "cloudConfigurationName");

            var storage = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings[cloudConfigurationName].ConnectionString);
            var blobClient = storage.CreateCloudBlobClient();
            this.InboxContainer = blobClient.GetContainerReference(containerName);
            var tableClient = storage.CreateCloudTableClient();
            this.InboxTable = new InboxContext(tableClient, tableName);
            this.HttpClient = new HttpClient(httpHandler ?? new HttpClientHandler());
            this.ClientTable = new PushNotificationContext(tableClient, WindowsPushNotificationClientController.DefaultTableName);
        }

Same methods

InboxController::InboxController ( ) : System