Updating to use EventHubsCaptureAvroBlobUri to create the BlobClient directly,and modify reference of packages.

This commit is contained in:
Wenjie Yu (Wicresoft North America Ltd) 2021-04-19 11:45:13 +08:00
Родитель 809eb4c970
Коммит d9614163d9
3 изменённых файлов: 4 добавлений и 23 удалений

Просмотреть файл

@ -35,15 +35,6 @@
<Reference Include="Avro, Version=0.9.0.0, Culture=neutral, PublicKeyToken=b1248d7eeb9d0814, processorArchitecture=MSIL">
<HintPath>..\packages\Apache.Avro.1.7.7.2\lib\Avro.dll</HintPath>
</Reference>
<Reference Include="Azure.Core">
<HintPath>C:\Users\v-wenjyu\.nuget\packages\azure.core\1.8.1\lib\netstandard2.0\Azure.Core.dll</HintPath>
</Reference>
<Reference Include="Azure.Storage.Blobs">
<HintPath>C:\Users\v-wenjyu\.nuget\packages\azure.storage.blobs\12.8.1\lib\netstandard2.0\Azure.Storage.Blobs.dll</HintPath>
</Reference>
<Reference Include="Azure.Storage.Common">
<HintPath>C:\Users\v-wenjyu\.nuget\packages\azure.storage.common\12.7.1\lib\netstandard2.0\Azure.Storage.Common.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.1.2.10\lib\2.0\log4net.dll</HintPath>
</Reference>
@ -71,6 +62,7 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.8.1" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />

Просмотреть файл

@ -32,14 +32,9 @@ namespace DWDumper
public void Dump()
{
// Get the blob reference
string connectionString = "ConnectionString";
string containerName = "containerName";
string blobName = "blobName";
// Get the blob reference
BlobContainerClient container = new BlobContainerClient(connectionString, containerName);
container.Create();
BlobClient blob = container.GetBlobClient(blobName);
BlobClient blob = new BlobClient(new Uri(EventHubsCaptureAvroBlobUri));
using (var dataTable = GetWindTurbineMetricsTable())
{

Просмотреть файл

@ -66,13 +66,7 @@ namespace FunctionEGDWDumper
private static async void Dump(Uri fileUri)
{
// Get the blob reference
string connectionString = "ConnectionString";
string containerName = "containerName";
string blobName = "blobName";
BlobContainerClient container = new BlobContainerClient(connectionString, containerName);
container.Create();
BlobClient blob = container.GetBlobClient(blobName);
BlobClient blob = new BlobClient(fileUri);
using (var dataTable = GetWindTurbineMetricsTable())
{