没有合适的资源?快使用搜索试试~ 我知道了~
EncryptSecurityField
需积分: 0 2 下载量 174 浏览量
2008-05-07
11:05:05
上传
评论
收藏 262KB PDF 举报
温馨提示
试读
3页
Tutorial : Enterprise Library - Using Caching Application Block
资源详情
资源评论
资源推荐
Microsoft.NET Technology - vikas goyal
http://www.vikasgoyal.net
Tutorial : Enterprise Library - Using Validation Application Block
Validation Application Block (VAB) is a new addition to Enterprise Library 3.0 which is scheduled for
release in April, 2007. This walkthrough for beginners on how to configure and use VAB is based on the
Feb,2007 CTP of Enterprise Library 3.0.
VAB provides a generic and extensible framework for validating data.
It can be used at any tier of the application.
VAB comes with default adapters to integrate it with Asp.NET, Windows Forms or WCF based
applications.
The basic building block of VAB are validators and Rule Sets. Validator is a single class
responsible for performing a single validation on an object like check for 'null' while rule set is a
group of validators to be applied on object.
The validations on a type can be configured either in code, through attributes or in app config
file. The config file can be modified using the standard enterprise library tool.
The main steps in using VAB are as follows :
o Add VAB assemblies to the references of your project.
o Add VAB config section to the app config.
o Start adding the types in this section on which validations need to be performed.
o For each type add any number of rule sets and configure validators in them.
o Call Validator methods from application code by passing the object and the rule set
against which it needs to get validated.
Lets understand all of the above using a sample program.
Create a type 'Employee' on which we will perform validation :
using System;
using System.Collections.Generic;
using System.Text;
namespace Employee
{
public class Employee
{
private string name;
private string empNum;
public string Name
{
get
{
return name;
}
paulwangpl
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 课程设计-python爬虫-爬取日报,爬取日报文章后存储到本地,附带源代码+课程设计报告
- 软件和信息技术服务行业投资与前景预测.pptx
- 课程设计-基于SpringBoot + Mybatis+python爬虫NBA球员数据爬取可视化+源代码+文档+sql+效果图
- 软件品质管理系列二项目策划规范.doc
- 基于TensorFlow+PyQt+GUI的酒店评论情感分析,支持分析本地数据文件和网络爬取数据分析+源代码+文档说明+安装教程
- 软件定义无线电中的模拟电路测试技术.pptx
- 软件开发协议(作为技术开发合同附件).doc
- 软件开发和咨询行业技术趋势分析.pptx
- 软件测试题详解及答案.doc
- 软件漏洞生命周期管理策略.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0