public static ActorSelection LocateActor(this ActorSystem actorSystem, Type type, ActorMetaData parentActorMetaData = null)
 {
     return(SelectableActor.Select(type, parentActorMetaData ?? new ActorMetaData("user"), actorSystem));
 }
 public static ActorSelection LocateActor(this ActorSystem actorSystem, ActorMetaData actorMetaData)
 {
     return(SelectableActor.Select(actorMetaData, actorSystem));
 }
 public static IActorRef CreateActor <T>(this IActorContext actorContext, ActorSetUpOptions option = null, ActorMetaData parentActorMetaData = null) where T : ActorBase
 {
     return(actorContext.System.CreateActorSelector <T>(parentActorMetaData).Create(actorContext, option));
 }
 /// <summary>
 /// Selects an existing action i.e an actor that has already been created
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="actorSystem"></param>
 /// <param name="context"></param>
 /// <param name="parentActorMetaData"></param>
 /// <returns></returns>
 public static ActorSelection LocateActor <T>(this ActorSystem actorSystem, ActorMetaData parentActorMetaData = null) where T : ActorBase
 {
     return(actorSystem.LocateActor(typeof(T), parentActorMetaData));
 }
        // [Obsolete("WARNING: This should never be used outside test environment!!")]

        internal static ISelectableActor CreateActorSelector <T>(this ActorSystem actorSystem, ActorMetaData parentActorMetaData = null) where T : ActorBase
        {
            return(new SelectableActor().SetUp <T>(actorSystem, null, parentActorMetaData));
        }
Ejemplo n.º 6
0
 public static ActorSelection Select(ActorMetaData metaData, ActorSystem actorSystem)
 {
     return(actorSystem.ActorSelection(metaData.Path));
 }
Ejemplo n.º 7
0
        public static ActorSelection Select(Type type, ActorMetaData parentActorMetaData, ActorSystem actorSystem)
        {
            var metaData = ActorMetaDataByName(GetActorNameByType(null, type), parentActorMetaData);

            return(actorSystem.ActorSelection(metaData.Path));
        }
Ejemplo n.º 8
0
 public static ActorMetaData ActorMetaDataByName(string actorName, ActorMetaData parentActorMetaData = null)
 {
     return(new ActorMetaData(actorName, parentActorMetaData ?? new ActorMetaData("user")));
 }
Ejemplo n.º 9
0
        public ISelectableActor SetUp <T>(ActorSystem system, string actorName = null, ActorMetaData parentActorMetaData = null) where T : ActorBase
        {
            Actortype = typeof(T);

            ActorName = GetActorNameByType(actorName, Actortype);

            ActorMetaData = ActorMetaDataByName(ActorName, parentActorMetaData);
            ActorSystem   = system;
            return(this);
        }