Buck3tt
Buck3tt
CC#
Created by Buck3tt on 3/27/2025 in #help
Fetching XML files from Azure Storage Explorer sometime fails
What we do as well if something fails, we move it to an error folder. But if I move a file back (that should work), it works
6 replies
CC#
Created by Buck3tt on 3/27/2025 in #help
Fetching XML files from Azure Storage Explorer sometime fails
Ye sorry. This is the method:
public byte[] GetFileBytes(string fileName, ShareDirectoryClient sourceDirectory)
{
try
{
var fileClient = sourceDirectory.GetFileClient(fileName);
var fileByteArray = Download(fileClient.Download());

if (fileByteArray is null)
{
Log.Error($"{nameof(GetFileBytes)}: Downloading of file failed, returning.");
return null;
}

return fileByteArray;
}
catch (Exception ex)
{
Log.Error($"Something went wrong in {nameof(GetFileBytes)}: {ex.Message}.");
return null;
}
}
public byte[] GetFileBytes(string fileName, ShareDirectoryClient sourceDirectory)
{
try
{
var fileClient = sourceDirectory.GetFileClient(fileName);
var fileByteArray = Download(fileClient.Download());

if (fileByteArray is null)
{
Log.Error($"{nameof(GetFileBytes)}: Downloading of file failed, returning.");
return null;
}

return fileByteArray;
}
catch (Exception ex)
{
Log.Error($"Something went wrong in {nameof(GetFileBytes)}: {ex.Message}.");
return null;
}
}
6 replies
CC#
Created by Buck3tt on 11/28/2022 in #help
❔ Somewhat advanced check for ids in foreach, remove duplicated
This will have to work for now lol
22 replies
CC#
Created by Buck3tt on 11/28/2022 in #help
❔ Somewhat advanced check for ids in foreach, remove duplicated
No worries
22 replies
CC#
Created by Buck3tt on 11/28/2022 in #help
❔ Somewhat advanced check for ids in foreach, remove duplicated
must be after i assume
22 replies
CC#
Created by Buck3tt on 11/28/2022 in #help
❔ Somewhat advanced check for ids in foreach, remove duplicated
So it will never match
22 replies
CC#
Created by Buck3tt on 11/28/2022 in #help
❔ Somewhat advanced check for ids in foreach, remove duplicated
Since the string list itself wont have any similarity to the allids one
22 replies
CC#
Created by Buck3tt on 11/28/2022 in #help
❔ Somewhat advanced check for ids in foreach, remove duplicated
or just a part of the code?
22 replies
CC#
Created by Buck3tt on 11/28/2022 in #help
❔ Somewhat advanced check for ids in foreach, remove duplicated
Or do u mean to replace all of the code with the linq
22 replies
CC#
Created by Buck3tt on 11/28/2022 in #help
❔ Somewhat advanced check for ids in foreach, remove duplicated
I might explain this wrong
22 replies
CC#
Created by Buck3tt on 11/28/2022 in #help
❔ Somewhat advanced check for ids in foreach, remove duplicated
If there is a relation between an id and something in the higher stuff
22 replies
CC#
Created by Buck3tt on 11/28/2022 in #help
❔ Somewhat advanced check for ids in foreach, remove duplicated
Basicly just returns true or false
22 replies
CC#
Created by Buck3tt on 11/28/2022 in #help
❔ Somewhat advanced check for ids in foreach, remove duplicated
instead of all loops?
22 replies