正在阅读:用C#去除代码的SourceSafe管理用C#去除代码的SourceSafe管理

2004-06-16 10:10 出处:CSDN 作者:zhzuo 责任编辑:linjixiong


                  string strEnd; //标签文本结束内容

                   int offSet;//结束标签文本的偏移量

                   FileInfo fi = new FileInfo(file);

                   fi.Attributes =FileAttributes.Normal;

                   if(fi.Extension == ".sln")//如果是解决方案文件

                   {

                       strStart = "GlobalSection(SourceCodeControl)";

                       strEnd = "EndGlobalSection";

                       offSet = 19;//包含\r\n和空格

                   }

                   else//如果是项目文件

                   {

                       strStart = "SccProjectName";

                       strEnd = ">";

                       offSet = 0;

                   }

                   try

                   {

                       int start;//Vss标签文本开始索引

                       int end;//Vss标签文本结束索引

                       string content;//文件内容

                       using(FileStream fs = new FileStream(file,FileMode.Open,FileAccess.ReadWrite,FileShare.ReadWrite))

                       {

                            StreamReader sr = new StreamReader(fs);

                            content = sr.ReadToEnd();

 


察看评论详细内容 我要发表评论
作者笔名 简短内容 发表时间
:

键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品