@@ -529,10 +529,18 @@ public void DeleteSecret(string accountName, string databaseName, string secretN
529
529
}
530
530
}
531
531
532
+
533
+ #if NETSTANDARD
532
534
public USqlCredential GetSecret ( string accountName , string databaseName , string secretName )
533
535
{
534
536
return _catalogClient . Catalog . GetCredential ( accountName , databaseName , secretName ) ;
535
537
}
538
+ #else
539
+ public USqlSecret GetSecret ( string accountName , string databaseName , string secretName )
540
+ {
541
+ return _catalogClient . Catalog . GetSecret ( accountName , databaseName , secretName ) ;
542
+ }
543
+ #endif
536
544
537
545
public bool TestCatalogItem ( string accountName , CatalogPathInstance path ,
538
546
DataLakeAnalyticsEnums . CatalogItemType itemType )
@@ -847,12 +855,23 @@ private IList<USqlExternalDataSource> GetExternalDataSources(string accountName,
847
855
return toReturn ;
848
856
}
849
857
858
+ #if NETSTANDARD
850
859
private USqlCredential GetCredential ( string accountName , string databaseName , string credName )
851
860
{
852
861
return _catalogClient . Catalog . GetCredential ( accountName , databaseName , credName ) ;
853
862
}
863
+ #else
864
+ private ObsoleteUSqlCredential GetCredential ( string accountName , string databaseName , string credName )
865
+ {
866
+ return new ObsoleteUSqlCredential ( _catalogClient . Catalog . GetCredential ( accountName , databaseName , credName ) , databaseName , computeAccountName : accountName ) ;
867
+ }
868
+ #endif
854
869
870
+ #if NETSTANDARD
855
871
private IList < USqlCredential > GetCredentials ( string accountName , string databaseName )
872
+ #else
873
+ private IList < ObsoleteUSqlCredential > GetCredentials ( string accountName , string databaseName )
874
+ #endif
856
875
{
857
876
List < USqlCredential > toReturn = new List < USqlCredential > ( ) ;
858
877
var response = _catalogClient . Catalog . ListCredentials ( accountName , databaseName ) ;
@@ -863,7 +882,11 @@ private IList<USqlCredential> GetCredentials(string accountName, string database
863
882
toReturn . AddRange ( response ) ;
864
883
}
865
884
885
+ #if NETSTANDARD
866
886
return toReturn ;
887
+ #else
888
+ return toReturn . Select ( element => new ObsoleteUSqlCredential ( element , databaseName , computeAccountName : accountName ) ) . ToList ( ) ;
889
+ #endif
867
890
}
868
891
869
892
private USqlSchema GetSchema ( string accountName , string databaseName ,
@@ -1116,8 +1139,8 @@ private IList<USqlType> GetTypes(string accountName, string databaseName,
1116
1139
return toReturn ;
1117
1140
}
1118
1141
1119
- #endregion
1120
- #region Compute Policy Operations
1142
+ #endregion
1143
+ #region Compute Policy Operations
1121
1144
public ComputePolicy CreateComputePolicy ( string resourceGroupName , string accountName , string policyName , Guid objectId , string objectType , int ? maxAnalyticsUnitsPerJob = null , int ? minPriorityPerJob = null )
1122
1145
{
1123
1146
if ( string . IsNullOrEmpty ( resourceGroupName ) )
@@ -1189,8 +1212,8 @@ public void DeleteComputePolicy(string resourceGroupName, string accountName, st
1189
1212
_accountClient . ComputePolicies . Delete ( resourceGroupName , accountName , policyName ) ;
1190
1213
}
1191
1214
1192
- #endregion
1193
- #region Job Related Operations
1215
+ #endregion
1216
+ #region Job Related Operations
1194
1217
1195
1218
public JobRecurrenceInformation GetJobReccurence ( string accountName , Guid recurrenceId , DateTimeOffset ? start = null , DateTimeOffset ? end = null )
1196
1219
{
@@ -1302,9 +1325,9 @@ public List<JobInformationBasic> ListJobs(string accountName, string filter, int
1302
1325
return jobList . GetRange ( 0 , Math . Min ( curCount , top . Value ) ) ;
1303
1326
}
1304
1327
1305
- #endregion
1328
+ #endregion
1306
1329
1307
- #region internal helpers
1330
+ #region internal helpers
1308
1331
internal string GetResourceGroupByAccountName ( string accountName )
1309
1332
{
1310
1333
try
@@ -1355,9 +1378,9 @@ internal string GetWildcardFilterString(string propertyName, string value)
1355
1378
// default case requires both
1356
1379
return string . Format ( "startswith({0},'{1}') and endswith({0},'{2}')" , propertyName , subStrings [ 0 ] , subStrings [ 1 ] ) ;
1357
1380
}
1358
- #endregion
1381
+ #endregion
1359
1382
1360
- #region private helpers
1383
+ #region private helpers
1361
1384
1362
1385
private IPage < JobInformationBasic > ListJobsWithNextLink ( string nextLink )
1363
1386
{
@@ -1470,6 +1493,6 @@ private bool IsCatalogItemOrList(CatalogPathInstance path, DataLakeAnalyticsEnum
1470
1493
1471
1494
return isList ;
1472
1495
}
1473
- #endregion
1496
+ #endregion
1474
1497
}
1475
1498
}
0 commit comments