Skip to content

Commit

Permalink
[CS0809] pragma warning disable (#6489)
Browse files Browse the repository at this point in the history
* [CS0809] pragma warning disable
- ActorRef  `public override bool IsTerminated`
- EmptyLocalActorRef  `public override bool IsTerminated`
- RemoteActorRef `public override bool IsTerminated`
- TestProbe `public override bool IsTerminated`

* fixes
  • Loading branch information
eaba authored Mar 6, 2023
1 parent 4ea4e0a commit bfe6636
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/core/Akka.Remote/RemoteActorRef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ public RemoteActorRef(RemoteTransport remote, Address localAddressToUse, ActorPa
/// Obsolete. Use <see cref="Watch"/> or <see cref="ReceiveActor.Receive{T}(Action{T}, Predicate{T})">Receive&lt;<see cref="Akka.Actor.Terminated"/>&gt;</see>
/// </summary>
[Obsolete("Use Context.Watch and Receive<Terminated> [1.1.0]")]
#pragma warning disable CS0809
public override bool IsTerminated => false;

#pragma warning restore CS0809

/// <summary>
/// Gets the child.
Expand Down
3 changes: 3 additions & 0 deletions src/core/Akka.TestKit/TestProbe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public void Reply(object message)
Sender.Tell(message,TestActor);
}


/// <summary>
/// N/A
/// </summary>
Expand All @@ -91,7 +92,9 @@ public void Reply(object message)
/// </exception>
/// <returns>N/A</returns>
[Obsolete("Cannot create a TestProbe from a TestProbe", true)]
#pragma warning disable CS0809
public override TestProbe CreateTestProbe(string name=null)
#pragma warning restore CS0809
{
throw new NotSupportedException("Cannot create a TestProbe from a TestProbe");
}
Expand Down
4 changes: 3 additions & 1 deletion src/core/Akka/Actor/ActorRef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -560,10 +560,12 @@ public override bool IsLocal
{
get { return true; }
}

/// <inheritdoc cref="InternalActorRefBase"/>
[Obsolete("Use Context.Watch and Receive<Terminated> [1.1.0]")]
#pragma warning disable CS0809
public override bool IsTerminated { get { return false; } }
#pragma warning restore CS0809
}


Expand Down
5 changes: 3 additions & 2 deletions src/core/Akka/Actor/EmptyLocalActorRef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@ public EmptyLocalActorRef(IActorRefProvider provider, ActorPath path, EventStrea
/// <summary>
/// TBD
/// </summary>
public override IActorRefProvider Provider { get { return _provider; } }
public override IActorRefProvider Provider { get { return _provider; } }

/// <summary>
/// TBD
/// </summary>
[Obsolete("Use Context.Watch and Receive<Terminated> [1.1.0]")]
#pragma warning disable CS0809
public override bool IsTerminated { get { return true; } }

#pragma warning restore CS0809
/// <summary>
/// TBD
/// </summary>
Expand Down

0 comments on commit bfe6636

Please sign in to comment.