Example #1
0
        protected void _Action(string action)
        {
            if (_action == null)
            {
                _action = new ODataAction();
            }

            _action.ActionName = action;
        }
Example #2
0
        protected void _ActionIds(string key, string id)
        {
            if (_action == null)
            {
                _action = new ODataAction();
            }

            var parameter = new ODataParameter(key, id);

            _action.Parameters.AddOrUpdate(parameter);
        }
Example #3
0
        protected void _SubAction(string subAction, string key, string id)
        {
            var action =
                _subActions.FirstOrDefault(x => x.ActionName.Equals(subAction, StringComparison.OrdinalIgnoreCase));

            if (action == null)
            {
                action = new ODataAction
                {
                    ActionName = subAction
                };
                _subActions.Add(action);
            }

            if (!string.IsNullOrEmpty(id))
            {
                var parameter = new ODataParameter(key, id);

                action.Parameters.AddOrUpdate(parameter);
            }
        }