Skip to content

Commit

Permalink
removed unwanted code
Browse files Browse the repository at this point in the history
  • Loading branch information
sourabh1007 committed Aug 9, 2023
1 parent f8739d9 commit 6e65ee7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ public CustomDiagnosticAndEventListener(string diagnosticSourceName, string even
/// IObserver Override
/// </summary>
public void OnCompleted() {
throw new NotImplementedException();
Console.WriteLine("OnCompleted");
}

/// <summary>
/// IObserver Override
/// </summary>
public void OnError(Exception error) {
throw new NotImplementedException();
Console.WriteLine($"OnError : {error}");
}

/// <summary>
Expand Down Expand Up @@ -67,15 +67,13 @@ public void OnNext(KeyValuePair<string, object> value)
{
if (activity.Id == Activity.Current.Id)
{
Console.WriteLine();
Console.WriteLine("---------------------------------------------------------------------------------------------------------");
Console.WriteLine($" Activity Name: {activity.DisplayName}");
Console.WriteLine($" Activity Operation Name: {activity.OperationName}");
foreach (KeyValuePair<string, string?> actualTag in activity.Tags)
{
Console.WriteLine($" {actualTag.Key} ==> {actualTag.Value}");
}
Console.WriteLine("---------------------------------------------------------------------------------------------------------");
Console.WriteLine();
return;
}
}
Expand All @@ -90,7 +88,6 @@ public void OnNext(DiagnosticListener value)
{
if (value.Name == this.diagnosticSourceName && this.Subscriptions != null)
{
Console.WriteLine();
Console.WriteLine($"CustomDiagnosticAndEventListener : OnNext : {value.Name}");
lock (this.Activities)
{
Expand All @@ -106,7 +103,6 @@ protected override void OnEventSourceCreated(EventSource eventSource)
{
if (eventSource != null && eventSource.Name.Equals(this.eventSourceName))
{
Console.WriteLine();
Console.WriteLine($"CustomDiagnosticAndEventListener : OnEventSourceCreated : {eventSource.Name}");
this.EnableEvents(eventSource, EventLevel.Informational); // Enable information level events
}
Expand All @@ -117,8 +113,6 @@ protected override void OnEventSourceCreated(EventSource eventSource)
/// </summary>
protected override void OnEventWritten(EventWrittenEventArgs eventData)
{
Console.WriteLine();
Console.WriteLine("---------------------------------------------------------------------------------------------------------");
Console.WriteLine($" Event Name: {eventData.EventName}");
Console.WriteLine($" Event Level: {eventData.Level}");
if(eventData.Payload != null)
Expand All @@ -133,7 +127,7 @@ protected override void OnEventWritten(EventWrittenEventArgs eventData)
{
Console.WriteLine($" Event Payload: NULL");
}
Console.WriteLine("---------------------------------------------------------------------------------------------------------");
Console.WriteLine();
}

public override void Dispose()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Content Include="..\..\..\..\..\Users\sourabhjain\.nuget\packages\microsoft.azure.cosmos\3.33.0-preview\contentFiles\any\netstandard2.0\ThirdPartyNotice.txt" Link="ThirdPartyNotice.txt">
<Private>False</Private>
<NuGetPackageVersion>3.33.0-preview</NuGetPackageVersion>
<NuGetItemType>Content</NuGetItemType>
<NuGetPackageId>Microsoft.Azure.Cosmos</NuGetPackageId>
<Pack>false</Pack>
</Content>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.35.2-preview" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.0" />
Expand Down

0 comments on commit 6e65ee7

Please sign in to comment.