History

GSF: Migrated all file license references from Eclipse to MIT.

ritchiecarroll committed 11 years ago

Commit 6d94f5f1 parent f2bebe31382 files · +3427 −2850Browse files

Showing the changes to Source/Applications/DataSubscriberTest/Program.cs (1 of 1382 files). Show all

Unified · Split

Source/Applications/DataSubscriberTest/Program.cs+15−2
@@ -5,10 +5,10 @@ · 4 unmodified lines
55 //
66 // Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
77 // the NOTICE file distributed with this work for additional information regarding copyright ownership.
8−// The GPA licenses this file to you under the Eclipse Public License -v 1.0 (the "License"); you may
8+// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may
99 // not use this file except in compliance with the License. You may obtain a copy of the License at:
1010 //
11−// http://www.opensource.org/licenses/eclipse-1.0.php
11+// http://www.opensource.org/licenses/MIT
1212 //
1313 // Unless agreed to in writing, the subject software distributed under the License is distributed on an
1414 // "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
@@ -25,9 +25,11 @@ · 10 unmodified lines
2525
2626 using System;
2727 using System.Collections.Generic;
28+using System.Data;
2829 using System.Text;
2930 using System.Timers;
3031 using GSF;
32+using GSF.IO;
3133 using GSF.TimeSeries;
3234 using GSF.TimeSeries.Transport;
3335 using Random = GSF.Security.Cryptography.Random;
@@ -56,6 +58,7 @@ namespace DataSubscriberTest · 22 unmodified lines
5658 subscriber.ConnectionEstablished += subscriber_ConnectionEstablished;
5759 subscriber.ConnectionTerminated += subscriber_ConnectionTerminated;
5860 subscriber.NewMeasurements += subscriber_NewMeasurements;
61+ subscriber.MetaDataReceived += subscriber_MetaDataReceived;
5962
6063 StringBuilder connectionString = new StringBuilder();
6164
@@ -105,6 +108,13 @@ namespace DataSubscriberTest · 43 unmodified lines
105108 timer.Stop();
106109 }
107110
111+ static void subscriber_MetaDataReceived(object sender, EventArgs<System.Data.DataSet> e)
112+ {
113+ DataSet dataSet = e.Argument;
114+ dataSet.WriteXml(FilePath.GetAbsolutePath("Metadata.xml"), XmlWriteMode.WriteSchema);
115+ Console.WriteLine("Data set serialized with {0} tables...", dataSet.Tables.Count);
116+ }
117+
108118 static void timer_Elapsed(object sender, ElapsedEventArgs e)
109119 {
110120 if (subscriber.IsConnected)
@@ -175,6 +185,9 @@ namespace DataSubscriberTest · 64 unmodified lines
175185
176186 static void subscriber_ConnectionEstablished(object sender, EventArgs e)
177187 {
188+
189+ //subscriber.SendServerCommand(ServerCommand.MetaDataRefresh);
190+
178191 //// Request cipher key rotation
179192 //subscriber.SendServerCommand(ServerCommand.RotateCipherKeys);
180193

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t