コード例 #1
0
        public async Task AzureStorageProvider_Save()
        {
            //ClearAzureTable( PartitionKey ).Wait();

            XDocument schema = AzureTableStorageProvider.GetDefaultSchema();

            TelemetryClient client = new TelemetryClient();
            ErrorReport     report;

            try {
                throw new GenericException(ErrorCode.GENERIC_CRITICAL_ERROR, "Test Exception Message");
            } catch (Exception e) {
                report = new ErrorReport(e);
                client.AddActiveReport(report);
            }

            await client.UploadActiveReportsAsync(AzureStorageEmulator);

            TableQuery <DynamicTableEntity> retrieve = new TableQuery <DynamicTableEntity>().Where(
                TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, PartitionKey)
                );

            //var entities = AzureStorageEmulator.StorageTable.ExecuteQuerySegmentedAsync( retrieve, null );
            //return StorageTable.ExecuteAsync( BuildInsertOperation( report ) ).AsTask();

            //Assert.AreEqual( report.ActivityTime.ToString( "o" ), ( await entities ).First().Properties["_ActivityTime"].StringValue );

            //ClearAzureTable( PartitionKey ).Wait();
        }
コード例 #2
0
        public void AzureStorageProvider_SAS_Save()
        {
            XDocument schema = AzureTableStorageProvider.GetDefaultSchema();

            TelemetryClient client = new TelemetryClient();
            ErrorReport     report;

            try {
                throw new GenericException(ErrorCode.GENERIC_CRITICAL_ERROR, "Test Exception Message");
            } catch (Exception e) {
                report = new ErrorReport(e);
                client.AddActiveReport(report);
            }

            client.UploadActiveReportsAsync(AzureTestStorage_SAS).Wait();
        }