Пример #1
0
        /// <summary>
        /// Restore request constructor
        /// </summary>
        /// <param name="restoreRequest"></param>
        public RestoreReqEntity(RestoreReqResponse restoreRequest)
        {
            EventDateDetails dateDetails = new EventDateDetails(DateTime.Now);

            base.PartitionKey = $"{dateDetails.year}_{dateDetails.WeekNumber}";
            base.RowKey       = Guid.NewGuid().ToString();

            restoreRequest.StatusLocationUri += $"{base.PartitionKey}/{base.RowKey}";

            CurrentStatus          = restoreRequest.Status;
            RestoreReqRespDataJSON = JsonConvert.SerializeObject(restoreRequest);
        }
Пример #2
0
        /// <summary>
        /// Event Data Constructor
        /// </summary>
        /// <param name="eventData"></param>
        public EventData(string eventData)
        {
            string eventId;

            DateTime eventDateTime;

            ReceivedEventData = IBlobEvent.ParseBlobEvent(eventData, out eventId, out eventDateTime);

            if (ReceivedEventData != null)
            {
                ReceivedEventDataJSON = JsonConvert.SerializeObject(ReceivedEventData);

                EventDateDetails dateDetails = new EventDateDetails(eventDateTime);

                base.PartitionKey = $"{dateDetails.year}_{dateDetails.WeekNumber}";

                base.RowKey = $"{dateDetails.formattedDate}_{eventId.Replace("-", "")}";
            }
        }