static public Snapshot.SnapshotList LoadSnapshots(string serverInstance) { // Create return snapshot list. Snapshot.SnapshotList snapshotList = new SnapshotList(); // Retrieve snapshot information for a server. try { using (SqlConnection connection = new SqlConnection(Program.gController.Repository.ConnectionString)) { connection.Open(); using (SqlDataReader rdr = Sql.SqlHelper.ExecuteReader(connection, null, CommandType.Text, string.Format(QueryGetSnapshotList, serverInstance), null)) { while (rdr.Read()) { Snapshot snap = new Snapshot(rdr); snapshotList.Add(snap); } } } } catch (SqlException ex) { logX.loggerX.Error(@"Error - Unable to get snapshot list", ex); MsgBox.ShowError(ErrorMsgs.CantGetSnapshots, ex); } return(snapshotList); }
/// <summary>Snippet for List</summary> public void List() { // Snippet: List(string, CallSettings) // Create client SnapshotsClient snapshotsClient = SnapshotsClient.Create(); // Initialize request argument(s) string project = ""; // Make the request SnapshotList response = snapshotsClient.List(project); // End snippet }
/// <summary>Snippet for ListAsync</summary> public async Task ListAsync() { // Snippet: ListAsync(string, CallSettings) // Additional: ListAsync(string, CancellationToken) // Create client SnapshotsClient snapshotsClient = await SnapshotsClient.CreateAsync(); // Initialize request argument(s) string project = ""; // Make the request SnapshotList response = await snapshotsClient.ListAsync(project); // End snippet }
private IEnumerable <Snapshot> GetAllProjectSnapshots() { SnapshotsResource.ListRequest request = Service.Snapshots.List(Project); do { SnapshotList response = request.Execute(); if (response.Items != null) { foreach (Snapshot snapshot in response.Items) { yield return(snapshot); } } request.PageToken = response.NextPageToken; } while (!Stopping && request.PageToken != null); }
private void FireEventToRule_Click(object sender, EventArgs e) { if (_item == null) { MessageBox.Show("Please select an Item first..."); return; } EventSource eventSource = new EventSource() { FQID = _item.FQID, Name = _item.Name }; EventHeader eventHeader = new EventHeader() { ID = Guid.NewGuid(), Class = "NewEventToRule", Type = _textBoxEventType.Text, Timestamp = DateTime.Now, Message = _textBoxMessage.Text, Name = _textBoxEventName.Text, Source = eventSource }; // In this sample the snap shots are being saved. This will make the // the build-in AlarmPreview in Smart Client display them in the case where the event result in an alarm. SnapshotList snapshots = new SnapshotList(); for (int ix = 0; ix < _imageList.Count; ix++) { snapshots.Add(new Snapshot() { Image = convertImage(_imageList[ix]) }); } AnalyticsEvent analyticsEvent = new AnalyticsEvent() { EventHeader = eventHeader, SnapshotList = snapshots }; EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(MessageId.Server.NewEventCommand) { Data = analyticsEvent }); }
/// <summary>Snippet for List</summary> public void ListRequestObject() { // Snippet: List(ListSnapshotsRequest, CallSettings) // Create client SnapshotsClient snapshotsClient = SnapshotsClient.Create(); // Initialize request argument(s) ListSnapshotsRequest request = new ListSnapshotsRequest { PageToken = "", MaxResults = 0U, Filter = "", OrderBy = "", Project = "", ReturnPartialSuccess = false, }; // Make the request SnapshotList response = snapshotsClient.List(request); // End snippet }
/// <summary>Snippet for ListAsync</summary> public async Task ListRequestObjectAsync() { // Snippet: ListAsync(ListSnapshotsRequest, CallSettings) // Additional: ListAsync(ListSnapshotsRequest, CancellationToken) // Create client SnapshotsClient snapshotsClient = await SnapshotsClient.CreateAsync(); // Initialize request argument(s) ListSnapshotsRequest request = new ListSnapshotsRequest { PageToken = "", MaxResults = 0U, Filter = "", OrderBy = "", Project = "", ReturnPartialSuccess = false, }; // Make the request SnapshotList response = await snapshotsClient.ListAsync(request); // End snippet }
public Group() { Children = new SnapshotList <Actor>(4); IsTransform = true; }
internal DataNodeCollection(DataNode parent) { _parent = parent; _nodes = new SnapshotList <DataNode>(); }
public Group() { Children = new SnapshotList<Actor>(4); IsTransform = true; }