/// <summary>
        /// Creates a new instance of HawkActionFilter using a IHawkCredentialRepository 
        /// implementation
        /// </summary>
        /// <param name="repository">IHawkCredentialRepository implementation</param>
        public RequiresHawkAttribute(IHawkCredentialRepository repository)
            : base()
        {
            if (repository == null)
                throw new ArgumentNullException("repository");

            this.credentials = (id) => repository.Get(id);
        }
示例#2
0
        /// <summary>
        /// Creates a new instance of HawkActionFilter using a IHawkCredentialRepository
        /// implementation
        /// </summary>
        /// <param name="repository">IHawkCredentialRepository implementation</param>
        public RequiresHawkAttribute(IHawkCredentialRepository repository)
            : base()
        {
            if (repository == null)
            {
                throw new ArgumentNullException("repository");
            }

            this.credentials = (id) => repository.Get(id);
        }
示例#3
0
        /// <summary>
        /// Creates a new instance of HawkActionFilter using a IHawkCredentialRepository
        /// implementation
        /// </summary>
        /// <param name="repository">IHawkCredentialRepository implementation</param>
        public HawkRequestFilter(IHawkCredentialRepository repository)
            : base()
        {
            if (repository == null)
            {
                throw new ArgumentNullException("repository");
            }

            this.credentials = (id) => repository.Get(id);
        }