protected override void ProcessRecord() { if (ParameterSetName.Equals(BlobParameterSetName, StringComparison.InvariantCultureIgnoreCase)) { var toAdd = new StorageAccount { Name = Blob, Properties = new StorageAccountProperties { AccessKey = AccessKey } }; DataLakeAnalyticsClient.AddStorageAccount(ResourceGroupName, Account, toAdd); } else { var toAdd = new DataLakeStoreAccount { Name = DataLakeStore }; DataLakeAnalyticsClient.AddDataLakeStoreAccount(ResourceGroupName, Account, toAdd); if (Default) { DataLakeAnalyticsClient.SetDefaultDataLakeStoreAccount(ResourceGroupName, Account, toAdd); } } }
public override void ExecuteCmdlet() { if (ParameterSetName.Equals(BlobParameterSetName, StringComparison.InvariantCultureIgnoreCase)) { var toAdd = new StorageAccountInfo { Name = Blob, Properties = new StorageAccountProperties { AccessKey = AccessKey } }; DataLakeAnalyticsClient.AddStorageAccount(ResourceGroupName, Account, toAdd); } else { var toAdd = new DataLakeStoreAccountInfo { Name = DataLakeStore, Properties = new DataLakeStoreAccountInfoProperties() }; DataLakeAnalyticsClient.AddDataLakeStoreAccount(ResourceGroupName, Account, toAdd); if (Default) { DataLakeAnalyticsClient.SetDefaultDataLakeStoreAccount(ResourceGroupName, Account, toAdd); } } }
public override void ExecuteCmdlet() { if (ParameterSetName.Equals(BlobParameterSetName, StringComparison.InvariantCultureIgnoreCase)) { var toAdd = new AddStorageAccountParameters { AccessKey = AccessKey }; DataLakeAnalyticsClient.AddStorageAccount(ResourceGroupName, Account, Blob, toAdd); } else { var toAdd = new DataLakeStoreAccountInformation ( name: DataLakeStore ); DataLakeAnalyticsClient.AddDataLakeStoreAccount(ResourceGroupName, Account, toAdd); } }