Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified Microsoft.Azure.EventHubs.sln
100644 → 100755
Empty file.
Empty file modified appveyor.yml
100644 → 100755
Empty file.
Empty file modified build/azuredeploy.json
100644 → 100755
Empty file.
Empty file modified build/build.ps1
100644 → 100755
Empty file.
Empty file modified build/keyfile.snk
100644 → 100755
Empty file.
Empty file modified event-hubs.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified readme.md
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/AzureBlobLease.cs
100644 → 100755
Empty file.
12 changes: 7 additions & 5 deletions src/Microsoft.Azure.EventHubs.Processor/AzureStorageCheckpointLeaseManager.cs
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using Microsoft.Azure.EventHubs.Processor.Options;

namespace Microsoft.Azure.EventHubs.Processor
{
using System;
Expand Down Expand Up @@ -257,7 +259,7 @@ public async Task<Lease> CreateLeaseIfNotExistsAsync(string partitionId) // thro
{
CloudBlockBlob leaseBlob = GetBlockBlobReference(partitionId);
returnLease = new AzureBlobLease(partitionId, leaseBlob);
string jsonLease = JsonConvert.SerializeObject(returnLease);
string jsonLease = JsonConvert.SerializeObject(returnLease, JsonConvertOptions.GetOptions());

ProcessorEventSource.Log.AzureStorageManagerInfo(
this.host.Id,
Expand Down Expand Up @@ -340,7 +342,7 @@ async Task<bool> AcquireLeaseCoreAsync(AzureBlobLease lease)
lease.Token = newToken;
lease.Owner = this.host.HostName;
lease.IncrementEpoch(); // Increment epoch each time lease is acquired or stolen by a new host
await leaseBlob.UploadTextAsync(JsonConvert.SerializeObject(lease), null, AccessCondition.GenerateLeaseCondition(lease.Token), null, null).ConfigureAwait(false);
await leaseBlob.UploadTextAsync(JsonConvert.SerializeObject(lease, JsonConvertOptions.GetOptions()), null, AccessCondition.GenerateLeaseCondition(lease.Token), null, null).ConfigureAwait(false);
}
catch (StorageException se)
{
Expand Down Expand Up @@ -392,7 +394,7 @@ async Task<bool> ReleaseLeaseCoreAsync(AzureBlobLease lease)
Token = string.Empty,
Owner = string.Empty
};
await leaseBlob.UploadTextAsync(JsonConvert.SerializeObject(releasedCopy), null, AccessCondition.GenerateLeaseCondition(leaseId), null, null).ConfigureAwait(false);
await leaseBlob.UploadTextAsync(JsonConvert.SerializeObject(releasedCopy, JsonConvertOptions.GetOptions()), null, AccessCondition.GenerateLeaseCondition(leaseId), null, null).ConfigureAwait(false);
await leaseBlob.ReleaseLeaseAsync(AccessCondition.GenerateLeaseCondition(leaseId)).ConfigureAwait(false);
}
catch (StorageException se)
Expand Down Expand Up @@ -430,7 +432,7 @@ async Task<bool> UpdateLeaseCoreAsync(AzureBlobLease lease)
CloudBlockBlob leaseBlob = lease.Blob;
try
{
string jsonToUpload = JsonConvert.SerializeObject(lease);
string jsonToUpload = JsonConvert.SerializeObject(lease, JsonConvertOptions.GetOptions());
ProcessorEventSource.Log.AzureStorageManagerInfo(this.host.Id, lease.PartitionId, $"Raw JSON uploading: {jsonToUpload}");
await leaseBlob.UploadTextAsync(jsonToUpload, null, AccessCondition.GenerateLeaseCondition(token), null, null).ConfigureAwait(false);
}
Expand All @@ -447,7 +449,7 @@ async Task<AzureBlobLease> DownloadLeaseAsync(string partitionId, CloudBlockBlob
string jsonLease = await blob.DownloadTextAsync().ConfigureAwait(false);

ProcessorEventSource.Log.AzureStorageManagerInfo(this.host.Id, partitionId, "Raw JSON downloaded: " + jsonLease);
AzureBlobLease rehydrated = (AzureBlobLease)JsonConvert.DeserializeObject(jsonLease, typeof(AzureBlobLease));
AzureBlobLease rehydrated = (AzureBlobLease)JsonConvert.DeserializeObject(jsonLease, typeof(AzureBlobLease), JsonConvertOptions.GetOptions());
AzureBlobLease blobLease = new AzureBlobLease(rehydrated, blob);
return blobLease;
}
Expand Down
Empty file modified src/Microsoft.Azure.EventHubs.Processor/BlobErrorCodeStrings.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/Checkpoint.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/CloseReason.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/EventProcessorHost.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/ICheckpointManager.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/IEventProcessor.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/ILeaseManager.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/Lease.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/LeaseLostException.cs
100644 → 100755
Empty file.
12 changes: 2 additions & 10 deletions src/Microsoft.Azure.EventHubs.Processor/Microsoft.Azure.EventHubs.Processor.csproj
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>This is the next generation Azure Event Hubs .NET Standard Event Processor Host library. For more information about Event Hubs, see https://azure.microsoft.com/en-us/services/event-hubs/</Description>
<AssemblyTitle>Microsoft.Azure.EventHubs.Processor</AssemblyTitle>
<VersionPrefix>2.0.0</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFrameworks>net461;netstandard2.0;uap10.0;</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>Microsoft.Azure.EventHubs.Processor</AssemblyName>
<AssemblyOriginatorKeyFile>../../build/keyfile.snk</AssemblyOriginatorKeyFile>
Expand All @@ -27,32 +26,25 @@
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'">
<NugetTargetMoniker>UAP,Version=v10.0</NugetTargetMoniker>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.Azure.EventHubs\Microsoft.Azure.EventHubs.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" />
<PackageReference Include="WindowsAzure.Storage" Version="8.1.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform " Version="5.2.3" />
</ItemGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

namespace Microsoft.Azure.EventHubs.Processor.Options
{
/// <summary>
/// JsonConvert Options
/// </summary>
public static class JsonConvertOptions
{
/// <summary>
/// Get the JsonConvert formatting options. so it's not conflicting / dependent upon the user's code.
/// </summary>
/// <returns></returns>
public static JsonSerializerSettings GetOptions()
{
return new JsonSerializerSettings
{
Formatting = Formatting.Indented,
ContractResolver = new CamelCasePropertyNamesContractResolver(),
NullValueHandling = NullValueHandling.Ignore
};
}
}
}
Empty file modified src/Microsoft.Azure.EventHubs.Processor/PartitionContext.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/PartitionManager.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/PartitionPump.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/PartitionPumpStatus.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs.Processor/ProcessorEventSource.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/ActiveClientLink.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/ActiveClientLinkManager.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/ActiveClientLinkObject.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/AmqpClientConstants.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/AmqpEventDataSender.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/AmqpEventHubClient.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/AmqpExceptionHelper.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/AmqpMessageConverter.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/AmqpPartitionReceiver.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/AmqpSelectorFilter.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/AmqpServiceClient.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/MappingType.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Amqp/SerializationUtilities.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/BatchOptions.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/EventData.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/EventDataBatch.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/EventDataDiagnosticExtensions.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/EventDataSender.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/EventHubClient.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/EventHubRuntimeInformation.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/EventHubsDiagnosticSource.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/EventHubsEventSource.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/EventPosition.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/IPartitionReceiveHandler.cs
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/Microsoft.Azure.EventHubs/Microsoft.Azure.EventHubs.csproj
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyTitle>Microsoft.Azure.EventHubs</AssemblyTitle>
<VersionPrefix>2.0.0</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFrameworks>net461;netstandard2.0;uap10.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>Microsoft.Azure.EventHubs</AssemblyName>
<AssemblyOriginatorKeyFile>../../build/keyfile.snk</AssemblyOriginatorKeyFile>
Expand Down
Empty file modified src/Microsoft.Azure.EventHubs/PartitionReceiver.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/PartitionSender.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/AsyncLock.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/ClaimConstants.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/ClientConstants.cs
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/Microsoft.Azure.EventHubs/Primitives/ClientEntity.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public string ClientId
}

/// <summary>
/// Gets the <see cref="RetryPolicy.RetryPolicy"/> for the ClientEntity.
/// Gets the <see cref="EventHubs.RetryPolicy"/> for the ClientEntity.
/// </summary>
public RetryPolicy RetryPolicy
{
Expand Down
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/ClientInfo.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/EventHubsException.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/EventHubsUriHelper.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/ExceptionUtility.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/Fx.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/ITokenProvider.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/JsonSecurityToken.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/MessagingEntityType.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/RetryExponential.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/RetryPolicy.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/SecurityToken.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/ServerBusyException.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/StringUtility.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/Ticks.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/TimeoutHelper.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/TokenProvider.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Primitives/TokenScope.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Properties/AssemblyInfo.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/ReceiverOptions.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/ReceiverRuntimeInfo.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Resources.Designer.cs
100644 → 100755
Empty file.
Empty file modified src/Microsoft.Azure.EventHubs/Resources.resx
100644 → 100755
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/Client/ClientTestBase.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/Client/DataBatchTests.cs
100644 → 100755
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/Client/DiagnosticsTests.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/Client/MiscTests.cs
100644 → 100755
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/Client/NegativeCases.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/Client/ReceiverTests.cs
100644 → 100755
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/Client/RetryTests.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/Client/SendTests.cs
100644 → 100755
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/Client/TimeoutTests.cs
100644 → 100755
Empty file.
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/Client/WebSocketTests.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/Processor/NegativeCases.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/Properties/AssemblyInfo.cs
100644 → 100755
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/TestConstants.cs
100644 → 100755
Empty file.
Empty file modified test/Microsoft.Azure.EventHubs.Tests/TestUtility.cs
100644 → 100755
Empty file.