示例#1
0
 /// <inheritdoc />
 public void ConfigureDataServer(DataServer server)
 {
     foreach (var source in Sources)
     {
         server.AddSource(source);
     }
 }
示例#2
0
 /// <summary>
 /// Returns the tag identified or null if it is not found.
 /// </summary>
 /// <param name="server">The data server to search for the tag.</param>
 /// <param name="tagId">The tag identifier to look for.</param>
 /// <returns>The tag or null if it was not found.</returns>
 public static Task <ITag> ResolveTagAsync(this DataServer server, TagIdentifier tagId)
 {
     return(server.Sources[tagId.Source].ResolveTagAsync(tagId));
 }
示例#3
0
 /// <summary>
 /// Adds a field to the data table given a tag identifier and a server to search the tag in.
 /// </summary>
 /// <param name="table">The data to which to add a field.</param>
 /// <param name="server">The data server to search for the tag.</param>
 /// <param name="tagId">The tag to add as a field.</param>
 /// <returns>The added field.</returns>
 public static async Task <DataField> AddFieldAsync(this DataTable table, DataServer server, TagIdentifier tagId)
 {
     return(table.AddField(await server.ResolveTagAsync(tagId)));
 }