예제 #1
0
파일: Service.cs 프로젝트: ratiel/Vindictus
        public void RequestOperation(IEntity entity, Location location, Operation op, bool makeEntity)
        {
            IEntityProxy connection = this.Connect(entity, location, makeEntity);

            connection.ConnectionSucceeded += delegate(object sender, EventArgs <IEntityProxy> e)
            {
                connection.RequestOperation(op);
            };
            connection.ConnectionFailed += delegate(object sender, EventArgs <IEntityProxy> e)
            {
                op.IssueFailEvent();
            };
            op.OnComplete += delegate(Operation _)
            {
                connection.Close();
            };
            op.OnFail += delegate(Operation _)
            {
                connection.Close();
            };
        }
예제 #2
0
 private static void UpdateRankBasis(Service service, IEntity entity, long cID, string rankID, long score)
 {
     if (FeatureMatrix.IsEnable("CharacterRank") && service != null && entity != null)
     {
         IEntityProxy connection = service.Connect(entity, new Location
         {
             ID       = cID,
             Category = "RankService.RankService"
         });
         UpdateRankBasis updateRankBasis = new UpdateRankBasis(cID, rankID, score, 0L);
         updateRankBasis.OnFail += delegate(Operation _)
         {
         };
         updateRankBasis.OnComplete += delegate(Operation _)
         {
             connection.Close();
         };
         connection.ConnectionSucceeded += delegate(object _, EventArgs <IEntityProxy> __)
         {
             connection.RequestOperation(updateRankBasis);
         };
     }
 }