Rozdíly
Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
Obě strany předchozí revize Předchozí verze Následující verze | Předchozí verze | ||
cs:mervis-db:10-api [2021/10/25 12:31] v.kohout [C#] |
cs:mervis-db:10-api [2024/05/08 10:42] (aktuální) |
||
---|---|---|---|
Řádek 25: | Řádek 25: | ||
^GetVariableStatsAsync|Obsolete| | ^GetVariableStatsAsync|Obsolete| | ||
^CheckCredentials| | | ^CheckCredentials| | | ||
+ | |||
+ | ===== Vlastnosti objektu ===== | ||
+ | * (UTC) Časová známka - UTC časová známka záznamu | ||
+ | * Platnost do - UTC časová známka konce platnosti konkrétního záznamu | ||
+ | * Interval - doba (v sekundách), | ||
===== Příklady použití ===== | ===== Příklady použití ===== | ||
Řádek 268: | Řádek 273: | ||
} | } | ||
- | var res = await dbClient.ReplaceDataAsync(new List< | + | var res = await dbClient.ReplaceDataAsync(new List< |
} | } | ||
} | } | ||
Řádek 284: | Řádek 289: | ||
class Program | class Program | ||
{ | { | ||
- | static | + | static |
{ | { | ||
// | // | ||
- | // Demo of asynchronous method. | + | // Create access to the real server. |
+ | // Without SSL connections, | ||
+ | // The client is automatically generated from the WSDL file available here: https:// | ||
// | // | ||
- | var task = Task.Run(async () => | + | try |
{ | { | ||
- | // | + | using (HistoryDbAccessClient client = new HistoryDbAccessClient(HistoryDbAccessClient.EndpointConfiguration.HistoryAccess, |
- | // Create access to the real server. | + | |
- | // Without SSL connections, | + | |
- | // The client is automatically generated from the WSDL file available here: https:// | + | |
- | // | + | |
- | using (HistoryDbAccessClient client = new HistoryDbAccessClient("HistoryAccess", " | + | |
{ | { | ||
// Authentication credentials in the database. | // Authentication credentials in the database. | ||
Řádek 303: | Řádek 305: | ||
// Specification of the variables through Key-Value. | // Specification of the variables through Key-Value. | ||
// Here we use 2 variables. | // Here we use 2 variables. | ||
- | KeyValuePair[][] variableKeys = new KeyValuePair[][] { | + | ESG.Db.Server.Shared.KeyValuePair[][] variableKeys = new ESG.Db.Server.Shared.KeyValuePair[][] { |
- | new KeyValuePair[] { | + | new |
- | new KeyValuePair (false, /*Key*/ " | + | new |
- | new KeyValuePair (false, /*Key*/ " | + | new |
}, | }, | ||
- | new KeyValuePair[] { | + | new |
- | new KeyValuePair (false, /*Key*/ " | + | new |
- | new KeyValuePair (false, /*Key*/ " | + | new |
} | } | ||
}; | }; | ||
Řádek 321: | Řádek 323: | ||
aggregation.IsoPattern = new string[] { " | aggregation.IsoPattern = new string[] { " | ||
aggregation.From = new DateTime(2018, | aggregation.From = new DateTime(2018, | ||
- | aggregation.To = | + | aggregation.To = new DateTime(2018, |
aggregation.TimeZone = @" | aggregation.TimeZone = @" | ||
Řádek 375: | Řádek 377: | ||
} while (variableOffset != -1); | } while (variableOffset != -1); | ||
} | } | ||
- | }); | ||
Console.WriteLine(" | Console.WriteLine(" | ||
- | try | ||
- | { | ||
- | task.Wait(); | ||
} | } | ||
catch (Exception exc) | catch (Exception exc) | ||
Řádek 392: | Řádek 390: | ||
Console.ReadLine(); | Console.ReadLine(); | ||
} | } | ||
- | |||
} | } | ||
} | } |