码迷,mamicode.com
首页 > 其他好文 > 详细

通过reflector来查找sharepoint dll

时间:2015-05-12 09:16:30      阅读:95      评论:0      收藏:0      [点我收藏+]

标签:

背景介绍:

由于测试过程当中需要写一些case模拟sharepoint的操作,在实际的应用过程当中有一些操作是不能够马上写出来的,这时候可以通过一系列办法来尝试解决:

方法解决:

1.直接搜索google,看看有没有前人做过相应的工作,但是这样的话有时候会找不到

2.借助reflector查看相应的sharepoint dll查看sharepoint自己的操作是什么样子的

 以List Setting-》Validation Settings举例,首先页面打开至Validation Settings部分,然后粘出来此时的url,找到相应的aspx页,此时我们会看到一个叫做:

VldSetng.aspx的,然后在sharepoint机器上搜索这个文件,当找到这个文件之后打开:

<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" DynamicMasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.ApplicationPages.ValidationSettingsPage"       %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

在头部会看到这样的语句,查找inherits节点,根据他找到相应的命名空间,根据命名空间查找他所属哪一个dll,比如这个查找到他在Microsoft.SharePoint.ApplicationPages.dll当中

那么用reflector打开这个dll,直接搜索Microsoft.SharePoint.ApplicationPages.ValidationSettingsPage,一般在名如*onload*或者btnsave**setting这样的方法中能得到自己想要的答案

通过reflector来查找sharepoint dll

标签:

原文地址:http://www.cnblogs.com/AmyWen/p/4486903.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!