{"action":"created","issue":{"url":"https://api.github.com/repos/akkadotnet/akka.net/issues/762","labels_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/762/labels{/name}","comments_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/762/comments","events_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/762/events","html_url":"https://github.com/akkadotnet/akka.net/pull/762","id":65055534,"number":762,"title":"Make ActorRef an interface or The breaking-just-about-everything PR","user":{"login":"HCanber","id":800302,"avatar_url":"https://avatars.githubusercontent.com/u/800302?v=3","gravatar_id":"","url":"https://api.github.com/users/HCanber","html_url":"https://github.com/HCanber","followers_url":"https://api.github.com/users/HCanber/followers","following_url":"https://api.github.com/users/HCanber/following{/other_user}","gists_url":"https://api.github.com/users/HCanber/gists{/gist_id}","starred_url":"https://api.github.com/users/HCanber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HCanber/subscriptions","organizations_url":"https://api.github.com/users/HCanber/orgs","repos_url":"https://api.github.com/users/HCanber/repos","events_url":"https://api.github.com/users/HCanber/events{/privacy}","received_events_url":"https://api.github.com/users/HCanber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-29T12:25:08Z","updated_at":"2015-03-29T17:44:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/akkadotnet/akka.net/pulls/762","html_url":"https://github.com/akkadotnet/akka.net/pull/762","diff_url":"https://github.com/akkadotnet/akka.net/pull/762.diff","patch_url":"https://github.com/akkadotnet/akka.net/pull/762.patch"},"body":"Fixes #480 __Make ActorRef an interface__\r\nRelated to #633 __Fix interface naming conventions__ \r\nand #652 __Prefix user-facing interfaces with \"I\" to match .NET Convention__\r\n\r\n### The current implementation\r\nThe hierarchy for an actor ref looks like this:\r\n```\r\nAkka.Actor.ActorRef                (abstract class)\r\n+ Akka.Actor.InternalActorRef      (abstract class)\r\n|  + Akka.Actor.ActorRefWithCell\r\n|  |  + Akka.Actor.LocalActorRef\r\n|  |  |  + Akka.Actor.RootGuardianActorRef\r\n... and so on\r\n```\r\n\r\nEvery actor ref, except `Akka.Actor.NoSender`, has to inherit from `InternalActorRef` as the core framework casts actor refs to `InternalActorRef` to get access to internal members.\r\n\r\n### The new implementation\r\nThis PR introduces two new interfaces: `IActorRef` and `IInternalActorRef`. Every concrete class has to implement these two interfaces, but does not otherwise have to inherit from any base classes.\r\n\r\n### What's been done\r\nThe existing abstract class `ActorRef` has been renamed to `ActorRefBase` and the new interface `IActorRef` is used everywhere instead of `ActorRef`.\r\nThe same thing has been done to `InternalActorRef`: It has been renamed to `InternalActorRefBase` and the new interface `IInternalActorRef` is used.\r\n\r\nSince `IActorRef` is an interface the operators `==` `!=` has been removed. \r\n`ActorRef.Nobody` and `ActorRef.NoSender` has been moved to `ActorRefs`.\r\n`Tell(object message)` is now an extension method.\r\n\r\n### The commits and reviewing\r\nThis PR consists of three commits (oldest to newest):\r\n- The first renames `ActorRef` to `ActorRefBase` and introduces an interface `ActorRef` and other things that had to change due to  `ActorRef` being an interface.\r\n- The second renames `InternalActorRef` to `InternalActorRefBase` and introduces a interface `InternalActorRef`\r\n- The third only renames the interface `ActorRef` to `IActorRef` and `InternalActorRef` to `IInternalActorRef`\r\n\r\nThis should make it a bit easier to review as renaming from ActorRef to IActorRef modifies 206 files and has been lifted out to its own commit. \r\nThe first two commits contains the real code changes and needs reviewing.\r\n\r\n\r\n# Breaking changes to the public API\r\n- Renamed:\r\n  - `ActorRef`          --> `IActorRef`\r\n  - `ActorRef.Nobody`   --> `ActorRefs.Nobody`\r\n  - `ActorRef.NoSender` --> `ActorRefs.NoSender`\r\n- `ActorRef`'s  operators `==` and `!=` has been removed. This means all expressions like `actorRef1 == actorRef2` must be replaced with `Equals(actorRef1, actorRef2)`\r\n- `Tell(object message)`, i.e. the implicit sender overload, has been moved\r\nto an extension method, and requires `using Akka.Actor;` to be accessible.\r\n- Implicit cast from `ActorRef` to `Routee` has been replaced with `Routee.FromActorRef(actorRef)`\r\n"},"comment":{"url":"https://api.github.com/repos/akkadotnet/akka.net/issues/comments/87449911","html_url":"https://github.com/akkadotnet/akka.net/pull/762#issuecomment-87449911","issue_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/762","id":87449911,"user":{"login":"Aaronontheweb","id":326939,"avatar_url":"https://avatars.githubusercontent.com/u/326939?v=3","gravatar_id":"","url":"https://api.github.com/users/Aaronontheweb","html_url":"https://github.com/Aaronontheweb","followers_url":"https://api.github.com/users/Aaronontheweb/followers","following_url":"https://api.github.com/users/Aaronontheweb/following{/other_user}","gists_url":"https://api.github.com/users/Aaronontheweb/gists{/gist_id}","starred_url":"https://api.github.com/users/Aaronontheweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aaronontheweb/subscriptions","organizations_url":"https://api.github.com/users/Aaronontheweb/orgs","repos_url":"https://api.github.com/users/Aaronontheweb/repos","events_url":"https://api.github.com/users/Aaronontheweb/events{/privacy}","received_events_url":"https://api.github.com/users/Aaronontheweb/received_events","type":"User","site_admin":false},"created_at":"2015-03-29T17:44:44Z","updated_at":"2015-03-29T17:44:44Z","body":"@rogeralsing @HCanber doesn't matter to me which one goes first, but we should do all of the smaller PRs first before we do either of these big ones. Thinking of @jcwrequests's DI one in particular (needs to be rebased on dev.)\r\n\r\nEither I way, I volunteer myself to clean up the mess when we try to merge both of these in :p "}}