in AdlsDotNetSDK/Core.cs [838:897]
internal static async Task<T> ListStatusAsync<T>(string path, String listAfter, String listBefore, int listSize, UserGroupRepresentation? userIdFormat, Selection selection, IDictionary<string, string> extraQueryParams, AdlsClient client, RequestOptions req, OperationResponse resp, CancellationToken cancelToken = default(CancellationToken)) where T : class
{
QueryParams qp = new QueryParams();
if (!string.IsNullOrWhiteSpace(listAfter))
{
qp.Add("listAfter", listAfter);
}
if (!string.IsNullOrWhiteSpace(listBefore))
{
qp.Add("listBefore", listBefore);
}
if (listSize > 0)
{
qp.Add("listSize", Convert.ToString(listSize));
}
userIdFormat = userIdFormat ?? UserGroupRepresentation.ObjectID;
if (selection != Selection.Minimal)
{
qp.Add("tooid", Convert.ToString(userIdFormat == UserGroupRepresentation.ObjectID));
}
if (selection != Selection.Standard)
{
qp.Add("select", selection.ToString());
}
if (extraQueryParams != null)
{
foreach (var key in extraQueryParams.Keys)
{
qp.Add(key, extraQueryParams[key]);
}
}
var responseTuple = await WebTransport.MakeCallAsync("LISTSTATUS", path, default(ByteBuffer), default(ByteBuffer), qp, client, req, resp, cancelToken).ConfigureAwait(false);
if (!resp.IsSuccessful) return null;
if (responseTuple != null)
{
try
{
using (MemoryStream stream = new MemoryStream(responseTuple.Item1))
{
return JsonCustomConvert.DeserializeObject<T>(stream, new Newtonsoft.Json.JsonSerializerSettings());
}
}
catch (Exception ex)
{
resp.IsSuccessful = false;
resp.Error = $"Unexpected problem with parsing JSON output. \r\nExceptionType: {ex.GetType()} \r\nExceptionMessage: {ex.Message}";
}
}
else
{
resp.IsSuccessful = false;
resp.Error = "Output is not expected";
}
return null;
}