コード例 #1
0
ファイル: DenyAttribute.cs プロジェクト: anandnooli79/RESTier
        /// <summary>
        /// Configures an API configuration.
        /// </summary>
        /// <param name="configuration">
        /// An API configuration.
        /// </param>
        /// <param name="type">
        /// The API type on which this attribute was placed.
        /// </param>
        public override void Configure(
            ApiConfiguration configuration,
            Type type)
        {
            var permission = ApiPermission.CreateDeny(
                this.PermissionType,
                this.To,
                this.OnNamespace,
                this.On,
                this.OnChild);

            configuration.AddPermission(permission);
        }