Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
themeEmacs
titleGraph 이벤트발생
var graphEngine = app.ApplicationServices.GetService<GraphEngine>();

var graphEventActor = AkkaLoad.RegisterActor(
    "GraphEventActor",
    actorSystem.ActorOf(Props.Create<GraphEventActor>(graphEngine),
        "GraphEventActor"
));

//Test For Graph
graphEventActor.Tell(new GraphEvent()
{
    Action = "Reset"
});

// 홍길동 생성
graphEventActor.Tell(new GraphEvent()
{
    Action = "Create",
    Alice = "Person",
    Name = "홍길동"
});

// 스파이더맨 영화생성
graphEventActor.Tell(new GraphEvent()
{
    Action = "Create",
    Alice = "Movie",
    Name = "스파이더맨"
});

// 홍길동은 스파이더맨을 시청하였다.
graphEventActor.Tell(new GraphEvent()
{
    Action = "Relation",                            
    Name = "시청",
    From = new GraphElementIdenty()
    {
        Alice = "Person",
        Name = "홍길동"
    },
    To = new GraphElementIdenty()
    {
        Alice = "Movie",
        Name = "스파이더맨"
    }
});


위 샘플이 수행되면, 아래와같은 결과를 확인할수 있습니다.

Image Added



추가참고 링크

...