示例#1
0
        public void OnCreated(CreatedContext filterContext)
        {
            Assert.NotNull(filterContext);
            Assert.NotNull(filterContext.Items);

            _results.Add(String.Format("{0}::{1}", _name, "OnCreated") 
                + (filterContext.Canceled ? " (with the canceled flag set)" : null));

            if (_setOnPostMethodParameters != null)
            {
                foreach (var parameter in _setOnPostMethodParameters)
                {
                    filterContext.SetJobParameter(parameter.Key, parameter.Value);
                }
            }

            if (_readParameters != null)
            {
                foreach (var parameter in _readParameters)
                {
                    Assert.Equal(
                        parameter.Value,
                        filterContext.GetJobParameter<string>(parameter.Key));
                }
            }

            if (_handlesException)
            {
                filterContext.ExceptionHandled = true;
            }
        }
 public void OnCreated(CreatedContext filterContext)
 {
 }