public PushNotificationController(CloudQueueClient cloudQueueClient, CloudBlobClient cloudBlobClient, IWnsEndpointRepository endpointsRepository, IAccessTokenProvider tokenProvider)
        {
            this.endpointsRepository = endpointsRepository;

            CloudStorageAccount account = null;

            if ((account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString")) == null)
            {
                if (cloudQueueClient == null)
                {
                    throw new ArgumentNullException("cloudQueueClient", "Cloud Queue Client cannot be null if no configuration is loaded.");
                }
            }

            this.cloudQueueClient = cloudQueueClient ?? account.CreateCloudQueueClient();
            this.blobClient = cloudBlobClient ?? account.CreateCloudBlobClient();

            this.tokenProvider = tokenProvider;
        }
        public PushNotificationController(CloudQueueClient cloudQueueClient, CloudBlobClient cloudBlobClient, IWnsEndpointRepository endpointsRepository, IAccessTokenProvider tokenProvider)
        {
            this.endpointsRepository = endpointsRepository;

            CloudStorageAccount account = null;

            if ((account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString")) == null)
            {
                if (cloudQueueClient == null)
                {
                    throw new ArgumentNullException("cloudQueueClient", "Cloud Queue Client cannot be null if no configuration is loaded.");
                }
            }

            this.cloudQueueClient = cloudQueueClient ?? account.CreateCloudQueueClient();
            this.blobClient       = cloudBlobClient ?? account.CreateCloudBlobClient();

            this.tokenProvider = tokenProvider;
        }