Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes whitespacing and unused references in ChildrenContainerBase.cs #688

Merged
merged 3 commits into from
Feb 28, 2015
Merged
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
2 changes: 1 addition & 1 deletion src/core/Akka/Actor/ActorBase.SupervisorStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
public abstract partial class ActorBase
{
private SupervisorStrategy _supervisorStrategy = null;
private SupervisorStrategy _supervisorStrategy;

/// <summary>
/// Gets or sets a <see cref="SupervisorStrategy"/>.
Expand Down
6 changes: 2 additions & 4 deletions src/core/Akka/Actor/ActorBase.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using Akka.Actor.Internal;
using Akka.Dispatch.SysMsg;
using Akka.Event;

namespace Akka.Actor
Expand Down Expand Up @@ -106,7 +105,7 @@ protected ActorRef Sender
/// Gets the self ActorRef
/// </summary>
/// <value>Self ActorRef</value>
protected ActorRef Self { get { return HasBeenCleared? _clearedSelf : Context.Self; } }
protected ActorRef Self { get { return HasBeenCleared ? _clearedSelf : Context.Self; } }

/// <summary>
/// Gets the context.
Expand Down Expand Up @@ -163,7 +162,7 @@ internal protected virtual bool AroundReceive(Receive receive, object message)
/// <summary>
/// EmptyReceive is a Receive-delegate that matches no messages at all, ever.
/// </summary>
protected static Receive EmptyReceive { get { return _=> false; } }
protected static Receive EmptyReceive { get { return _ => false; } }

/// <summary>
/// Is called when a message isn't handled by the current behavior of the actor
Expand All @@ -182,7 +181,6 @@ protected virtual void Unhandled(object message)
Context.System.EventStream.Publish(new UnhandledMessage(message, Sender, Self));
}


/// <summary>
/// Changes the Actor's behavior to become the new <see cref="Actor.Receive"/> handler.
/// This method acts upon the behavior stack as follows:
Expand Down
3 changes: 0 additions & 3 deletions src/core/Akka/Actor/ActorRefProvider.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Akka.Actor.Internals;
using Akka.Dispatch;
Expand Down Expand Up @@ -44,7 +43,6 @@ public interface ActorRefProvider
/// <summary>Gets the settings.</summary>
Settings Settings { get; }


/// <summary>
/// Initialization of an ActorRefProvider happens in two steps: first
/// construction of the object with settings, eventStream, etc.
Expand All @@ -71,7 +69,6 @@ public interface ActorRefProvider
/// <param name="path">A path returned by <see cref="TempPath"/>. Do NOT pass in any other path!</param>
void UnregisterTempActor(ActorPath path);


/// <summary>
/// Actor factory with create-only semantics: will create an actor as
/// described by <paramref name="props"/> with the given <paramref name="supervisor"/> and <paramref name="path"/> (may be different
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using Akka.Util.Internal.Collections;
Expand All @@ -23,41 +22,37 @@ protected ChildrenContainerBase(IImmutableMap<string, ChildStats> children)
public abstract ChildrenContainer ShallDie(ActorRef actor);
public abstract ChildrenContainer Unreserve(string name);

public IReadOnlyList<InternalActorRef> Children
public IReadOnlyList<InternalActorRef> Children
{
get
{
var children = (from stat in InternalChildren.AllValuesMinToMax
let childRestartStats = stat as ChildRestartStats
where childRestartStats != null
select childRestartStats.Child).ToList();
return children;
return (from stat in InternalChildren.AllValuesMinToMax
let childRestartStats = stat as ChildRestartStats
where childRestartStats != null
select childRestartStats.Child).ToList();
}
}

public IReadOnlyList<ChildRestartStats> Stats
public IReadOnlyList<ChildRestartStats> Stats
{
get
{
var children = (from stat in InternalChildren.AllValuesMinToMax
let childRestartStat = stat as ChildRestartStats
where childRestartStat != null
select childRestartStat).ToList();
return children;
return (from stat in InternalChildren.AllValuesMinToMax
let childRestartStats = stat as ChildRestartStats
where childRestartStats != null
select childRestartStats).ToList();
}
}

protected IImmutableMap<string, ChildStats> InternalChildren { get { return _children; } }


public bool TryGetByName(string name, out ChildStats stats)
public bool TryGetByName(string name, out ChildStats stats)
{
if (InternalChildren.TryGet(name, out stats)) return true;
stats = null;
return false;
}


public bool TryGetByRef(ActorRef actor, out ChildRestartStats childRestartStats)
{
ChildStats stats;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface InternalSupportsTestFSMRef<TState, TData>
/// </summary>
public class InternalActivateFsmLogging
{
private static readonly InternalActivateFsmLogging _instance=new InternalActivateFsmLogging();
private static readonly InternalActivateFsmLogging _instance = new InternalActivateFsmLogging();

private InternalActivateFsmLogging(){}
/// <summary>
Expand Down