-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathCSPStreamEvent.cs
More file actions
37 lines (30 loc) · 1.11 KB
/
CSPStreamEvent.cs
File metadata and controls
37 lines (30 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/********************************************************
* *
* Copyright (C) Microsoft. All rights reserved. *
* *
*********************************************************/
using System;
namespace Microsoft.Partner.CSP.APISamples.SubscriptionStream
{
class CSPStreamEvent
{
public string SubscriptionUri { get; set; }
public string SubscriptionEventType { get; set; }
public string RecipientCustomerUri { get; set; }
public DateTime EventDate { get; set; }
public string Data { get; set; }
public CSPStreamEvent() { }
public CSPStreamEvent(StreamPageResponse.StreamEntryResponse response)
{
this.SubscriptionUri = response.subscription_uri;
this.SubscriptionEventType = response.type;
this.RecipientCustomerUri = response.recipient_customer_uri;
this.Data = response.data.ToString().Replace(Environment.NewLine, "");
DateTime temp;
if (DateTime.TryParse(response.event_date, out temp))
{
this.EventDate = temp;
}
}
}
}