WaitForFile
Methode (Function) · gibt Boolean zurück
WaitForFile ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK.
Beschreibung (Originaltext der englischen SDK-Dokumentation): Waits until a file exists, can be opened for reading and is not locked by another process. Checks every 100 ms.
Rückgabe: True as soon as the file is accessible; False if the time ran out.
Deklaration
Public Function WaitForFile(ByVal filePath As String, ByVal waitTimeInMilliseconds As Integer) As Boolean
Parameter
| Name | Typ | Pflicht | Beschreibung |
|---|---|---|---|
filePath | String | erforderlich | Path of the file |
waitTimeInMilliseconds | Integer | erforderlich | Maximum waiting time in milliseconds |
Aufruf (VB.NET)
Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim filePath As String = ""
Dim waitTimeInMilliseconds As Integer = 0
If Not alo.WaitForFile(filePath, waitTimeInMilliseconds) Then
Console.WriteLine("Fehler: " & alo.Last_Error)
End If
Aufruf (C#)
var zfStandard = Aloaha_ZUGFeRD.iXML.ZUGFeRDVersion.xInvoice; // Optional ByRef im Konstruktor: in C# mit ref übergeben
var alo = new Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, false, "IHR-LIZENZSCHLUESSEL", ref zfStandard);
string filePath = "";
int waitTimeInMilliseconds = 0;
if (!alo.WaitForFile(filePath, waitTimeInMilliseconds))
{
Console.WriteLine("Fehler: " + alo.Last_Error);
}