public void InitializeAllFieldsCorrect() { //Arrange string primary = "primary"; string secondary = "secondary"; string requestID = "ID1"; string serviceName = "cache1"; System.Net.HttpStatusCode statusCode = System.Net.HttpStatusCode.OK; CachingKeysResponse response = new CachingKeysResponse() { Primary = primary, Secondary = secondary, StatusCode = statusCode, RequestId = requestID }; //Act CacheAccessKeys keys = new CacheAccessKeys(serviceName, response); //Assert Assert.Equal(primary, keys.Primary); Assert.Equal(secondary, keys.Secondary); Assert.Equal(statusCode, keys.StatusCode); Assert.Equal(requestID, keys.RequestId); Assert.Equal(serviceName, keys.Name); }
public CacheAccessKeys(string cacheServiceName, CachingKeysResponse response) { Name = cacheServiceName; Primary = response.Primary; Secondary = response.Secondary; StatusCode = response.StatusCode; RequestId = response.RequestId; }
public override void ExecuteCmdlet() { WriteWarning(CacheClient.GetManagedCacheRetirementMessage()); CachingKeysResponse response = CacheClient.GetAccessKeys(Name); WriteObject(new CacheAccessKeys(Name, response)); }
public override void ExecuteCmdlet() { WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458"); CachingKeysResponse response = CacheClient.GetAccessKeys(Name); WriteObject(new CacheAccessKeys(Name, response)); }
public override void ExecuteCmdlet() { if (string.IsNullOrEmpty(KeyType)) { KeyType = PrimaryKeyType; } CachingKeysResponse response = CacheClient.RegenerateAccessKeys(Name, KeyType); WriteObject(new CacheAccessKeys(Name, response)); }
public override void ExecuteCmdlet() { WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458"); if (string.IsNullOrEmpty(KeyType)) { KeyType = PrimaryKeyType; } CachingKeysResponse response = CacheClient.RegenerateAccessKeys(Name, KeyType); WriteObject(new CacheAccessKeys(Name, response)); }
public override void ExecuteCmdlet() { WriteWarning(CacheClient.GetManagedCacheRetirementMessage()); if (string.IsNullOrEmpty(KeyType)) { KeyType = PrimaryKeyType; } CachingKeysResponse response = CacheClient.RegenerateAccessKeys(Name, KeyType); WriteObject(new CacheAccessKeys(Name, response)); }
public override void ExecuteCmdlet() { CachingKeysResponse response = CacheClient.GetAccessKeys(Name); WriteObject(new CacheAccessKeys(Name, response)); }