public void MergeFromDeletedAction()
        {
            Fx.Assert(this.ActionType == AppActionType.SettingsChanged,
                      "We should not get two consecutive ApplicationDeleted notifications.");

            this.actionType = AppActionType.Deleted;
        }
        public void MergeFromCreatedAction(string path, int siteId, string appPoolId, bool requestsBlocked, string[] bindings)
        {
            Fx.Assert(this.ActionType == AppActionType.Deleted, "We should get ApplicationCreated notification only when the App is to be deleted.");

            // Delete + Created = SettingsChanged
            this.actionType = AppActionType.SettingsChanged;
            SetSettings(path, appPoolId, requestsBlocked, bindings);

            // SiteId is ignored because the siteId can't be changed for the same appKey.
        }
Beispiel #3
0
    public AppAction(byte[] bytes)
    {
        this.type = (AppActionType)bytes[1];
        switch (this.type)
        {
        case AppActionType.SignIn:
            this.playerId = BitConverter.ToInt32(bytes, 1);
            break;

        case AppActionType.GameJoined:
            this.playerSlot = BitConverter.ToInt32(bytes, 1);
            break;
        }
    }
Beispiel #4
0
        public async Task <IActionResult> AddAction(AddActionViewModel viewModel)
        {
            bool isValid = AppActionType.TryParse(Request.Form["Type"], out AppActionType type);

            if (isValid)
            {
                AppAction action = new AppAction()
                {
                    AppRuleId = viewModel.AppRuleId,
                    Type      = viewModel.Type,
                    Field     = viewModel.Field,
                    Para      = viewModel.Para
                };
                db.AppActions.Add(action);
                await db.SaveChangesAsync();
            }
            return(Ok());
        }
Beispiel #5
0
        public CommentType GetCommentType(Guid appID, int actionType)
        {
            if (appID == Consts.App_BasicAppID)//内置的应用
            {
                AppActionType type = (AppActionType)actionType;

                switch (type)
                {
                case AppActionType.WriteArticle:
                    return(CommentType.Blog);

                case AppActionType.UploadPicture:
                    return(CommentType.Photo);

                case AppActionType.UpdateDoing:
                    return(CommentType.Doing);

                case AppActionType.Share:
                    return(CommentType.Share);
                }
            }

            return(CommentType.All);
        }
Beispiel #6
0
 public AppRegistration(Type ObjectType, AppActionType ActionType)
 {
     this.ObjectType = ObjectType;
     this.ActionType = ActionType;
 }
Beispiel #7
0
        public void MergeFromCreatedAction(string path, int siteId, string appPoolId, bool requestsBlocked, string[] bindings)
        {
            Fx.Assert(this.ActionType == AppActionType.Deleted, "We should get ApplicationCreated notification only when the App is to be deleted.");

            // Delete + Created = SettingsChanged
            this.actionType = AppActionType.SettingsChanged;
            SetSettings(path, appPoolId, requestsBlocked, bindings);

            // SiteId is ignored because the siteId can't be changed for the same appKey.
        }
Beispiel #8
0
 AppAction(AppActionType actionType)
 {
     this.actionType = actionType;
 }
Beispiel #9
0
        public void MergeFromDeletedAction()
        {
            Fx.Assert(this.ActionType == AppActionType.SettingsChanged,
                "We should not get two consecutive ApplicationDeleted notifications.");

            this.actionType = AppActionType.Deleted;
        }
Beispiel #10
0
 public AppAction(AppActionType type)
 {
     this.type = type;
 }
 AppAction(AppActionType actionType)
 {
     this.actionType = actionType;
 }