Showing preview only (2,745K chars total). Download the full file or copy to clipboard to get everything.
Repository: lulianqi/FreeHttp
Branch: master
Commit: 51bd3d665887
Files: 168
Total size: 2.6 MB
Directory structure:
gitextract_sk9eg1ll/
├── .dockerignore
├── .gitattributes
├── .gitignore
├── AutoTest/
│ ├── CsvFileHelper.cs
│ ├── MyBytesHelper.cs
│ ├── MyCommonTool.cs
│ ├── MyExtensionMethods.cs
│ ├── ParameterizationContent/
│ │ ├── CaseParameterizationContent.cs
│ │ ├── ParameterizationContentEncodingType.cs
│ │ └── ParameterizationContentHelper.cs
│ ├── ParameterizationPick/
│ │ ├── ParameterPick.cs
│ │ ├── ParameterPickHelper.cs
│ │ └── ParameterPickType.cs
│ └── RunTimeStaticData/
│ ├── ActuatorStaticDataCollection.cs
│ ├── CaseRunTimeDataTypeEngine.cs
│ ├── CaseStaticDataType.cs
│ ├── IRunTimeDataSource.cs
│ ├── IRunTimeStaticData.cs
│ ├── MyStaticData/
│ │ ├── MyStaticDataIndex.cs
│ │ ├── MyStaticDataList.cs
│ │ ├── MyStaticDataLong.cs
│ │ ├── MyStaticDataNowTime.cs
│ │ ├── MyStaticDataRandomStr.cs
│ │ ├── MyStaticDataSourceCsv.cs
│ │ ├── MyStaticDataStrIndex.cs
│ │ └── MyStaticDataValue.cs
│ └── RunTimeStaticDataHelper.cs
├── FiddlerFreeHttp.cs
├── FiddlerHelper/
│ ├── FiddlerActuatorStaticDataCollectionController.cs
│ ├── FiddlerHttpFilter.cs
│ ├── FiddlerModificHttpRuleCollection.cs
│ ├── FiddlerModificSettingInfo.cs
│ ├── FiddlerRequsetChange.cs
│ ├── FiddlerResponseChange.cs
│ ├── FiddlerRuleGroup.cs
│ ├── FiddlerSessionHelper.cs
│ ├── IFiddlerHttpTamper.cs
│ ├── TamperProtocalType.cs
│ └── VersionControl/
│ └── FiddlerModificHttpRuleCollectionV1.cs
├── FiddlerSessionTamper.cs
├── FreeHttp.csproj
├── FreeHttp.sln
├── FreeHttpControl/
│ ├── ChangeEncodeForm.Designer.cs
│ ├── ChangeEncodeForm.cs
│ ├── ChangeEncodeForm.resx
│ ├── ControlHelper/
│ │ ├── LoadBitmap.cs
│ │ ├── LoadWindowService.cs
│ │ ├── MarkControlService.cs
│ │ └── MyControlHelper.cs
│ ├── EditCookieForm.Designer.cs
│ ├── EditCookieForm.cs
│ ├── EditCookieForm.resx
│ ├── EditKeyVaule.Designer.cs
│ ├── EditKeyVaule.cs
│ ├── EditKeyVaule.resx
│ ├── EditParameterPickWindow.Designer.cs
│ ├── EditParameterPickWindow.cs
│ ├── EditParameterPickWindow.resx
│ ├── EditSheetForm.Designer.cs
│ ├── EditSheetForm.cs
│ ├── EditSheetForm.resx
│ ├── FreeHttpWindow.Designer.cs
│ ├── FreeHttpWindow.cs
│ ├── FreeHttpWindow.resx
│ ├── FreeHttpWindowFunction.cs
│ ├── GetRemoteRuleWindow.Designer.cs
│ ├── GetRemoteRuleWindow.cs
│ ├── GetRemoteRuleWindow.resx
│ ├── HttpFilterWindow.Designer.cs
│ ├── HttpFilterWindow.cs
│ ├── HttpFilterWindow.resx
│ ├── MyBaseInfoWindow.cs
│ ├── MyBaseInfoWindow.resx
│ ├── MyControl/
│ │ ├── AddParameterPickBox.Designer.cs
│ │ ├── AddParameterPickBox.cs
│ │ ├── AddParameterPickBox.resx
│ │ ├── CBalloonBase.cs
│ │ ├── CBalloonBase.resx
│ │ ├── EditListView.Designer.cs
│ │ ├── EditListView.cs
│ │ ├── EditListView.resx
│ │ ├── ListViewExtended.cs
│ │ ├── MyEnableSwitch.Designer.cs
│ │ ├── MyEnableSwitch.cs
│ │ ├── MyEnableSwitch.resx
│ │ ├── MyEnabledPictureButton.cs
│ │ ├── MyListView.cs
│ │ ├── MyListView.resx
│ │ ├── MyPanel.cs
│ │ ├── MySwitchPictureButton.cs
│ │ ├── RawRequestEdit.Designer.cs
│ │ ├── RawRequestEdit.cs
│ │ ├── RawRequestEdit.resx
│ │ ├── RawResponseEdit.cs
│ │ ├── RawResponseEdit.designer.cs
│ │ ├── RawResponseEdit.resx
│ │ ├── TextBoxEditer.Designer.cs
│ │ ├── TextBoxEditer.cs
│ │ ├── TextBoxEditer.resx
│ │ └── WatermakTextBox.cs
│ ├── RemoveHead.Designer.cs
│ ├── RemoveHead.cs
│ ├── RemoveHead.resx
│ ├── RuleInfoWindow.cs
│ ├── RuleInfoWindow.designer.cs
│ ├── RuleInfoWindow.resx
│ ├── SaveShareRule.Designer.cs
│ ├── SaveShareRule.cs
│ ├── SaveShareRule.resx
│ ├── SetVaule.Designer.cs
│ ├── SetVaule.cs
│ ├── SetVaule.resx
│ ├── SettingWindow.Designer.cs
│ ├── SettingWindow.cs
│ ├── SettingWindow.resx
│ ├── ShowSheetForm.Designer.cs
│ ├── ShowSheetForm.cs
│ ├── ShowSheetForm.resx
│ ├── ShowTextForm.Designer.cs
│ ├── ShowTextForm.cs
│ ├── ShowTextForm.resx
│ ├── SortRule.Designer.cs
│ ├── SortRule.cs
│ ├── SortRule.resx
│ ├── StaticDataAddWindow.Designer.cs
│ ├── StaticDataAddWindow.cs
│ ├── StaticDataAddWindow.resx
│ ├── StaticDataManageWindow.Designer.cs
│ ├── StaticDataManageWindow.cs
│ ├── StaticDataManageWindow.resx
│ ├── UserFeedbackWindow.Designer.cs
│ ├── UserFeedbackWindow.cs
│ └── UserFeedbackWindow.resx
├── HttpHelper/
│ ├── ContentModific.cs
│ ├── HttpRequest.cs
│ ├── HttpResponse.cs
│ ├── ParameterContentModific.cs
│ ├── ParameterHttpRequest.cs
│ └── ParameterHttpResponse.cs
├── LICENSE
├── MyHelper/
│ ├── MyExtensionMethods.cs
│ ├── MyGlobalHelper.cs
│ ├── MyJsonHelper.cs
│ ├── MyKeyValuePair.cs
│ ├── SelfUpgradeHelp.cs
│ └── SerializableHelper.cs
├── Properties/
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Resources/
│ ├── MyResource.Designer.cs
│ └── MyResource.resx
├── WebService/
│ ├── ConfigurationData.cs
│ ├── DataModel/
│ │ ├── BaseResultModel.cs
│ │ ├── RuleDetails.cs
│ │ └── ShareRuleSummary.cs
│ ├── FeedbackService.cs
│ ├── HttpServer/
│ │ ├── CertificatesHelper.cs
│ │ ├── MyHttpListener.cs
│ │ └── MySocketHelper.cs
│ ├── MyWebTool.cs
│ ├── OperationReportService.cs
│ ├── RemoteLogService.cs
│ ├── RemoteRuleService.cs
│ ├── ShareRuleService.cs
│ ├── UpgradeService.cs
│ └── UserComputerInfo.cs
├── packages.config
└── readme.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .dockerignore
================================================
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.vs
**/.vscode
**/*.*proj.user
**/azds.yaml
**/charts
**/bin
**/obj
**/Dockerfile
**/Dockerfile.develop
**/docker-compose.yml
**/docker-compose.*.yml
**/*.dbmdl
**/*.jfm
**/secrets.dev.yaml
**/values.dev.yaml
**/.toolstarget
================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- Backup*.rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
#add by lulianqi
================================================
FILE: AutoTest/CsvFileHelper.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
/*******************************************************************************
* Copyright (c) 2016 lijie
* All rights reserved.
*
* 文件名称:
* 内容摘要: mycllq@hotmail.com
*
* 历史记录:
* 日 期: 201601010 创建人: lulianqi
* 描 述: 创建
*******************************************************************************/
namespace FreeHttp.AutoTest.MyCommonHelper.FileHelper
{
/// <summary>
/// 单个元素支持包括tab,换行回车(\r\n),空内容等在内的所有文本字符 (在使用时请确定文件的编码方式)
/// 可指定元素分割符,行非官方必须为\r\n(\r\n可以作为内容出现在元素中),转义字符必须为".
/// 转义所有的引号必须出现在首尾(如果不在首尾,则不会按转义符处理,直接作为引号处理)[excel可以读取转义出现在中间的情况,而本身存储不会使用这种方式,保存时并会强制修复这种异常,所以这里遇到中间转义的情况直接抛出指定异常]
/// 如果在被转义的情况下需要出现引号,则使用2个引号代替(如果需要在首部使用双引号,则需要转义该元素,其他地方可直接使用)(excel对所有双引号都进行转义,无论其出现位置,对于保存方式可以选择是否按excel的方式进行保存)
/// 每一行的结尾是不需要逗号结束的,如果多加一个逗号则标识该行会多一个空元素
/// 空行也是一个空元素,一个逗号是2个空元素,所以不可能出现有的行元素为空
/// 使用问题或疑问可通过mycllq@hotmail.com进行联系
/// </summary>
public sealed class CsvFileHelper : IDisposable
{
#region Members
//private FileStream _fileStream;
private Stream _stream;
private StreamReader _streamReader;
//private StreamWriter _streamWriter;
//private Stream _memoryStream;
private Encoding _encoding;
//private readonly StringBuilder _columnBuilder = new StringBuilder(100);
private Type _type = Type.File;
private bool _trimColumns = false;
private char _csvSeparator = ',';
#endregion Members
#region Properties
/// <summary>
/// Gets or sets whether column values should be trimmed
/// </summary>
public bool TrimColumns
{
get { return _trimColumns; }
set { _trimColumns = value; }
}
public Type DataSouceType
{
get{ return _type;}
}
/// <summary>
/// get or set Csv Separator (Default Values is ,)
/// </summary>
public char CsvSeparator
{
get { return _csvSeparator; }
set { _csvSeparator = value; }
}
#endregion Properties
#region Enums
/// <summary>
/// Type enum
/// </summary>
public enum Type
{
File,
Stream
}
#endregion Enums
#region Methods
/// <summary>
/// Initialises the reader to work from a file
/// </summary>
/// <param name="filePath">File path</param>
public CsvFileHelper(string filePath):this(filePath, Encoding.Default)
{
}
/// <summary>
/// Initialises the reader to work from a file
/// </summary>
/// <param name="filePath">File path</param>
/// <param name="encoding">Encoding</param>
public CsvFileHelper(string filePath, Encoding encoding)
{
_type = Type.File;
if (!File.Exists(filePath))
{
throw new FileNotFoundException(string.Format("The file '{0}' does not exist.", filePath));
}
//_stream = File.OpenRead(filePath); //return a FileStream (OpenRead 源码就是 return new FileStream(path, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None);)
_stream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
_stream.Position = 0;
_encoding = (encoding ?? Encoding.Default);
_streamReader = new StreamReader(_stream, _encoding);
}
/// <summary>
/// Initialises the reader to work from an existing stream
/// </summary>
/// <param name="stream">Stream</param>
public CsvFileHelper(Stream stream):this(stream, Encoding.Default)
{
}
/// <summary>
/// Initialises the reader to work from an existing stream
/// </summary>
/// <param name="stream">Stream</param>
/// <param name="encoding">Encoding</param>
public CsvFileHelper(Stream stream, Encoding encoding)
{
_type = Type.Stream;
if (stream == null)
{
throw new ArgumentNullException("The supplied stream is null.");
}
_stream = stream;
_stream.Position = 0;
_encoding = (encoding ?? Encoding.Default);
_streamReader = new StreamReader(_stream, _encoding);
}
/// <summary>
/// Initialises the reader to work from an existing stream (with the Separator char)
/// </summary>
/// <param name="stream">Stream</param>
/// <param name="encoding">Encoding</param>
/// <param name="yourSeparator"> the Separator char</param>
public CsvFileHelper(Stream stream, Encoding encoding, char yourSeparator): this(stream, encoding)
{
CsvSeparator = yourSeparator;
}
private List<string> ParseLine(string line)
{
StringBuilder _columnBuilder = new StringBuilder();
List<string> Fields = new List<string>();
bool inColumn = false; //是否是在一个列元素里
bool inQuotes = false; //是否需要转义
bool isNotEnd = false; //读取完毕未结束转义
_columnBuilder.Remove(0, _columnBuilder.Length);
// Iterate through every character in the line
for (int i = 0; i < line.Length; i++)
{
char character = line[i];
// If we are not currently inside a column
if (!inColumn)
{
// If the current character is a double quote then the column value is contained within
// double quotes, otherwise append the next character
inColumn = true;
if (character == '"')
{
inQuotes = true;
continue;
}
}
// If we are in between double quotes
if (inQuotes)
{
if ((i + 1) == line.Length)//这个字符已经结束了整行
{
if (character == '"') //正常转义结束,且该行已经结束
{
inQuotes = false;
continue; //当前字符不用添加,跳出后直结束后会添加该元素
}
else //异常结束,转义未收尾
{
isNotEnd = true;
}
}
else if (character == '"' && line[i + 1] == _csvSeparator) //结束转义,且后面有可能还有数据
{
inQuotes = false;
inColumn = false;
i++; //跳过下一个字符
}
else if (character == '"' && line[i + 1] == '"') //双引号转义
{
i++; //跳过下一个字符
}
else if (character == '"') //双引号单独出现(这种情况实际上已经是格式错误,为了兼容可暂时不处理)
{
throw new Exception(string.Format("[{0}]:格式错误,错误的双引号转义 near [{1}] ","ParseLine", line));
}
//其他情况直接跳出,后面正常添加
}
else if (character == _csvSeparator)
inColumn = false;
// If we are no longer in the column clear the builder and add the columns to the list
if (!inColumn) //结束该元素时inColumn置为false,并且不处理当前字符,直接进行Add
{
Fields.Add(TrimColumns ? _columnBuilder.ToString().Trim() : _columnBuilder.ToString());
_columnBuilder.Remove(0, _columnBuilder.Length);
}
else // append the current column
_columnBuilder.Append(character);
}
// If we are still inside a column add a new one (标准格式一行结尾不需要逗号结尾,而上面for是遇到逗号才添加的,为了兼容最后还要添加一次)
if (inColumn)
{
if (isNotEnd)
{
_columnBuilder.Append("\r\n");
}
Fields.Add(TrimColumns ? _columnBuilder.ToString().Trim() : _columnBuilder.ToString());
}
//如果inColumn为false,说明已经添加,因为最后一个字符为分隔符,所以后面要加上一个空元素
//另外一种情况是line为""空行,(空行也是一个空元素,一个逗号是2个空元素),正好inColumn为默认值false,在此处添加一空元素
else
{
Fields.Add("");
}
return Fields;
}
/// <summary>
/// 处理未完成的Csv单行
/// </summary>
/// <param name="line">数据源</param>
/// <returns>元素列表</returns>
private List<string> ParseContinueLine(string line)
{
StringBuilder _columnBuilder = new StringBuilder();
List<string> Fields = new List<string>();
_columnBuilder.Remove(0, _columnBuilder.Length);
if (line == "")
{
Fields.Add("\r\n");
return Fields;
}
for (int i = 0; i < line.Length; i++)
{
char character = line[i];
if ((i + 1) == line.Length)//这个字符已经结束了整行
{
if (character == '"') //正常转义结束,且该行已经结束
{
Fields.Add(TrimColumns ? _columnBuilder.ToString().TrimEnd() : _columnBuilder.ToString());
return Fields;
}
else //异常结束,转义未收尾
{
_columnBuilder.Append("\r\n");
Fields.Add(_columnBuilder.ToString());
return Fields;
}
}
else if (character == '"' && line[i + 1] == _csvSeparator) //结束转义,且后面有可能还有数据
{
Fields.Add(TrimColumns ? _columnBuilder.ToString().TrimEnd() : _columnBuilder.ToString());
i++; //跳过下一个字符
Fields.AddRange(ParseLine(line.Remove(0, i+1)));
break;
}
else if (character == '"' && line[i + 1] == '"') //双引号转义
{
i++; //跳过下一个字符
}
else if (character == '"') //双引号单独出现(这种情况实际上已经是格式错误,转义用双引号一定是【,"】【",】形式,包含在里面的双引号需要使用一对双引号进行转义)
{
throw new Exception(string.Format("[{0}]:格式错误,错误的双引号转义 near [{1}]", "ParseContinueLine", line));
}
_columnBuilder.Append(character);
}
return Fields;
}
public List<List<string>> GetListCsvData()
{
_stream.Position = 0;
List<List<string>> tempListCsvData = new List<List<string>>();
bool isNotEndLine = false;
//这里的ReadLine可能把转义的/r/n分割,需要后面单独处理
string tempCsvRowString = _streamReader.ReadLine();
while (tempCsvRowString!=null)
{
List<string> tempCsvRowList;
if (isNotEndLine)
{
tempCsvRowList = ParseContinueLine(tempCsvRowString);
isNotEndLine = (tempCsvRowList.Count > 0 && tempCsvRowList[tempCsvRowList.Count - 1].EndsWith("\r\n"));
List<string> myNowContinueList = tempListCsvData[tempListCsvData.Count - 1];
myNowContinueList[myNowContinueList.Count - 1] += tempCsvRowList[0];
tempCsvRowList.RemoveAt(0);
myNowContinueList.AddRange(tempCsvRowList);
}
else
{
tempCsvRowList = ParseLine(tempCsvRowString);
isNotEndLine = (tempCsvRowList.Count > 0 && tempCsvRowList[tempCsvRowList.Count - 1].EndsWith("\r\n"));
tempListCsvData.Add(tempCsvRowList);
}
tempCsvRowString = _streamReader.ReadLine();
}
return tempListCsvData;
}
public void Dispose()
{
if(_streamReader!=null)
{
_streamReader.Dispose();
}
if(_stream!=null)
{
_stream.Dispose();
}
}
#endregion
#region StaticTool
#region 编码方式可接受值
//请考虑让应用程序使用 UTF-8 或 Unicode (UTF-16) 作为默认编码。大多数其他编码要么不完整并将许多字符转换为“?”,要么在不同的平台上具有稍有不同的行为。非 Unicode 编码通常具有多义性,应用程序则不再试图确定合适的编码,也不再提供用户用来修复文本语言或编码的更正下拉菜单。
/*
This code produces the following output.
CodePage identifier and name BrDisp BrSave MNDisp MNSave 1-Byte ReadOnly
37 IBM037 False False False False True True
437 IBM437 False False False False True True
500 IBM500 False False False False True True
708 ASMO-708 True True False False True True
720 DOS-720 True True False False True True
737 ibm737 False False False False True True
775 ibm775 False False False False True True
850 ibm850 False False False False True True
852 ibm852 True True False False True True
855 IBM855 False False False False True True
857 ibm857 False False False False True True
858 IBM00858 False False False False True True
860 IBM860 False False False False True True
861 ibm861 False False False False True True
862 DOS-862 True True False False True True
863 IBM863 False False False False True True
864 IBM864 False False False False True True
865 IBM865 False False False False True True
866 cp866 True True False False True True
869 ibm869 False False False False True True
870 IBM870 False False False False True True
874 windows-874 True True True True True True
875 cp875 False False False False True True
932 shift_jis True True True True False True
936 gb2312 True True True True False True
949 ks_c_5601-1987 True True True True False True
950 big5 True True True True False True
1026 IBM1026 False False False False True True
1047 IBM01047 False False False False True True
1140 IBM01140 False False False False True True
1141 IBM01141 False False False False True True
1142 IBM01142 False False False False True True
1143 IBM01143 False False False False True True
1144 IBM01144 False False False False True True
1145 IBM01145 False False False False True True
1146 IBM01146 False False False False True True
1147 IBM01147 False False False False True True
1148 IBM01148 False False False False True True
1149 IBM01149 False False False False True True
1200 utf-16 False True False False False True
1201 unicodeFFFE False False False False False True
1250 windows-1250 True True True True True True
1251 windows-1251 True True True True True True
1252 Windows-1252 True True True True True True
1253 windows-1253 True True True True True True
1254 windows-1254 True True True True True True
1255 windows-1255 True True True True True True
1256 windows-1256 True True True True True True
1257 windows-1257 True True True True True True
1258 windows-1258 True True True True True True
1361 Johab False False False False False True
10000 macintosh False False False False True True
10001 x-mac-japanese False False False False False True
10002 x-mac-chinesetrad False False False False False True
10003 x-mac-korean False False False False False True
10004 x-mac-arabic False False False False True True
10005 x-mac-hebrew False False False False True True
10006 x-mac-greek False False False False True True
10007 x-mac-cyrillic False False False False True True
10008 x-mac-chinesesimp False False False False False True
10010 x-mac-romanian False False False False True True
10017 x-mac-ukrainian False False False False True True
10021 x-mac-thai False False False False True True
10029 x-mac-ce False False False False True True
10079 x-mac-icelandic False False False False True True
10081 x-mac-turkish False False False False True True
10082 x-mac-croatian False False False False True True
20000 x-Chinese-CNS False False False False False True
20001 x-cp20001 False False False False False True
20002 x-Chinese-Eten False False False False False True
20003 x-cp20003 False False False False False True
20004 x-cp20004 False False False False False True
20005 x-cp20005 False False False False False True
20105 x-IA5 False False False False True True
20106 x-IA5-German False False False False True True
20107 x-IA5-Swedish False False False False True True
20108 x-IA5-Norwegian False False False False True True
20127 us-ascii False False True True True True
20261 x-cp20261 False False False False False True
20269 x-cp20269 False False False False True True
20273 IBM273 False False False False True True
20277 IBM277 False False False False True True
20278 IBM278 False False False False True True
20280 IBM280 False False False False True True
20284 IBM284 False False False False True True
20285 IBM285 False False False False True True
20290 IBM290 False False False False True True
20297 IBM297 False False False False True True
20420 IBM420 False False False False True True
20423 IBM423 False False False False True True
20424 IBM424 False False False False True True
20833 x-EBCDIC-KoreanExtended False False False False True True
20838 IBM-Thai False False False False True True
20866 koi8-r True True True True True True
20871 IBM871 False False False False True True
20880 IBM880 False False False False True True
20905 IBM905 False False False False True True
20924 IBM00924 False False False False True True
20932 EUC-JP False False False False False True
20936 x-cp20936 False False False False False True
20949 x-cp20949 False False False False False True
21025 cp1025 False False False False True True
21866 koi8-u True True True True True True
28591 iso-8859-1 True True True True True True
28592 iso-8859-2 True True True True True True
28593 iso-8859-3 False False True True True True
28594 iso-8859-4 True True True True True True
28595 iso-8859-5 True True True True True True
28596 iso-8859-6 True True True True True True
28597 iso-8859-7 True True True True True True
28598 iso-8859-8 True True False False True True
28599 iso-8859-9 True True True True True True
28603 iso-8859-13 False False False False True True
28605 iso-8859-15 False True True True True True
29001 x-Europa False False False False True True
38598 iso-8859-8-i True True True True True True
50220 iso-2022-jp False False True True False True
50221 csISO2022JP False True True True False True
50222 iso-2022-jp False False False False False True
50225 iso-2022-kr False False True False False True
50227 x-cp50227 False False False False False True
51932 euc-jp True True True True False True
51936 EUC-CN False False False False False True
51949 euc-kr False False True True False True
52936 hz-gb-2312 True True True True False True
54936 GB18030 True True True True False True
57002 x-iscii-de False False False False False True
57003 x-iscii-be False False False False False True
57004 x-iscii-ta False False False False False True
57005 x-iscii-te False False False False False True
57006 x-iscii-as False False False False False True
57007 x-iscii-or False False False False False True
57008 x-iscii-ka False False False False False True
57009 x-iscii-ma False False False False False True
57010 x-iscii-gu False False False False False True
57011 x-iscii-pa False False False False False True
65000 utf-7 False False True True False True
65001 utf-8 True True True True False True
65005 utf-32 False False False False False True
65006 utf-32BE False False False False False True
*/
#endregion
/// <summary>
/// 静态构造函数只有在静态方法将要使用的时候才进行调用(静态成员同理)
/// </summary>
static CsvFileHelper()
{
isSaveAsExcel = true;
defaultEncoding = new System.Text.UTF8Encoding(false);
}
private static bool isSaveAsExcel ;
private static Encoding defaultEncoding;
private static char csvSeparator = ',';
//private static Encoding utfBom = System.Text.Encoding.GetEncoding("GB2312");
/// <summary>
/// get or set Csv Separator (Default Values is ,)
/// </summary>
public static char DefaultCsvSeparator
{
get { return csvSeparator; }
set { csvSeparator = value; }
}
/// <summary>
/// get or set if save as Excel type (出现在首部的“是必须转义的,而出现在中间的不可以不用专门转义,而excel对所有双引号都进行转义,无论其出现位置)
/// </summary>
public static bool IsSaveAsExcel
{
get { return isSaveAsExcel; }
set { isSaveAsExcel = value; }
}
/// <summary>
/// get or set Default Encoding (notice : if your want the System not with bom ,you should use the relevant Encoding)
/// </summary>
public static Encoding DefaultEncoding
{
get { return defaultEncoding; }
set { defaultEncoding = value; }
}
private static void WriteCsvVeiw(List<List<string>> yourListCsvData, TextWriter writer)
{
foreach(List<string> tempField in yourListCsvData)
{
if (tempField == null || tempField.Count==0)
{
continue;
}
WriteCsvLine(tempField, writer);
}
}
private static void WriteCsvLine(List<string> fields, TextWriter writer)
{
if (fields == null || fields.Count == 0)
{
return;
}
StringBuilder myStrBld = new StringBuilder();
//对于CSV数据来说不可能出现一行的数据元素的数量是0的情况,所以不用考虑fields.Count为0的情况(如果为0则为错误数据直接忽略)
//foreach(string tempField in fields) //使用foreach会产生许多不必要的string拷贝
for (int i = 0; i < fields.Count; i++)
{
//通过文件转换出来的fields是不会为null的,为了兼容外部构建数据源,可能出现null的情况,这里强制转换为""
if (fields[i] == null)
{
myStrBld.Append("");
}
else
{
bool quotesRequired = (isSaveAsExcel ? (fields[i].Contains(csvSeparator) || fields[i].Contains("\r\n") || fields[i].Contains("\"")) : (fields[i].Contains(csvSeparator) || fields[i].Contains("\r\n") || fields[i].StartsWith("\"")));
if (quotesRequired)
{
if (fields[i].Contains("\""))
{
myStrBld.Append(String.Format("\"{0}\"", fields[i].Replace("\"", "\"\"")));
}
else
{
myStrBld.Append(String.Format("\"{0}\"", fields[i]));
}
}
else
{
myStrBld.Append(fields[i]);
}
}
if (i < fields.Count - 1)
{
myStrBld.Append(csvSeparator);
}
}
writer.WriteLine(myStrBld.ToString());
}
public static void SaveCsvFile(string yourFilePath,List<List<string>> yourDataSouse,bool isAppend,Encoding yourEncode)
{
//FileStream myCsvStream = new FileStream(yourFilePath, FileMode.Create, FileAccess.ReadWrite);
if (isAppend && !File.Exists(yourFilePath))
{
throw new Exception("in Append mode the FilePath must exist");
}
if(!isAppend && !File.Exists(yourFilePath))
{
if (yourFilePath.Contains('\\'))
{
if (!Directory.Exists(yourFilePath.Remove(yourFilePath.LastIndexOf('\\'))))
{
throw new Exception("the FilePath or the Directory it not exist");
}
}
else
{
throw new Exception("find error in your FilePath");
}
}
//StreamWriter myCsvSw = new StreamWriter(yourFilePath, isAppend, yourEncode); //isAppend对应的Stream的FileMode 为 append ? FileMode.Append : FileMode.Create
//文件如果被其他任务打开并处于Write模式,此处会抛出异常(该工具也含多处异常抛出,使用时务必考虑接收这些异常)
StreamWriter myCsvSw = new StreamWriter(new FileStream(yourFilePath, isAppend ? FileMode.Append : FileMode.Create, FileAccess.Write, FileShare.ReadWrite), yourEncode);
if (yourDataSouse == null)
{
throw new Exception("your DataSouse is null");
}
WriteCsvVeiw(yourDataSouse, myCsvSw);
myCsvSw.Dispose();
}
public static void SaveCsvFile(string yourFilePath, List<List<string>> yourDataSouse)
{
SaveCsvFile(yourFilePath, yourDataSouse, false, defaultEncoding);
}
public static Stream OpenFile(string filePath)
{
Stream myStream;
try
{
myStream = new FileStream(filePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
}
catch (Exception)
{
return null;
}
return myStream;
}
#endregion
}
}
================================================
FILE: AutoTest/MyBytesHelper.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest
{
/// <summary>
/// hex 字符串显示时的分割方式
/// </summary>
public enum ShowHexMode
{
@null = 0, //不分格每个字节
space = 1, //以分格分割
spit0x = 2, //以0x分割 (用于显示16进制)
spitSpace0x = 3, //以 0x分割 (用于显示16进制)
spit0b = 4, //以0b分割 (用于显示2进制)
spitSpace0b = 5, //以 0b分割 (用于显示2进制)
spit0d = 6, //以0d分割 (用于显示10进制)
spitSpace0d = 7, //以 0d分割 (用于显示10进制)
spit_ = 8, //以下划线分割
spitM_ = 9 //以中划线分割
}
/// <summary>
/// 表示要代表数据的进制
/// </summary>
public enum HexDecimal
{
hex2 = 2,
hex10 = 10, //001 224 023 表示显示需要补0
hex16 = 16
}
public class MyBytes
{
#region ByteSring
private static Dictionary<HexDecimal, int> DictionaryHexDecimal = new Dictionary<HexDecimal, int>() { { HexDecimal.hex2, 8 }, { HexDecimal.hex10, 3 }, { HexDecimal.hex16, 2 } };
private static Dictionary<ShowHexMode, string> DictionaryShowHexMode = new Dictionary<ShowHexMode, string>() { { ShowHexMode.spitSpace0x, " 0x" }, { ShowHexMode.spit0x, "0x" }, { ShowHexMode.spitSpace0d, " 0d" }, { ShowHexMode.spit0d, "0d" }, { ShowHexMode.spitSpace0b, " 0b" }, { ShowHexMode.spit0b, "0b" }, { ShowHexMode.spitM_, "-" }, { ShowHexMode.spit_, "_" }, { ShowHexMode.space, " " }, { ShowHexMode.@null, "" } };
/// <summary>
/// 将字符串转换成16进制的可读字符串(使用默认UTF8编码)
/// </summary>
/// <param name="yourStr">用户字符串</param>
/// <returns>返回结果</returns>
public static string StringToHexString(string yourStr)
{
return StringToHexString(yourStr, Encoding.UTF8, HexDecimal.hex16, ShowHexMode.space);
}
/// <summary>
/// 将字符串转换成指定进制的可读字符串 (使用指定编码指定进制及指定格式)
/// </summary>
/// <param name="yourStr">用户字符串</param>
/// <param name="encode">指定编码</param>
/// <param name="hexaDecimal">指定进制</param>
/// <param name="stringMode">指定格式</param>
/// <returns>返回结果</returns>
public static string StringToHexString(string yourStr, Encoding encode, HexDecimal hexaDecimal, ShowHexMode stringMode)
{
byte[] tempBytes = encode.GetBytes(yourStr);
return ByteToHexString(tempBytes, hexaDecimal, stringMode);
}
/// <summary>
/// 将字节数组转换为指定进制的可读字符串
/// </summary>
/// <param name="yourBytes">需要转换的字节数组</param>
/// <param name="hexDecimal">指定进制</param>
/// <param name="stringMode">指定格式</param>
/// <returns>返回结果</returns>
public static string ByteToHexString(byte[] yourBytes, HexDecimal hexDecimal, ShowHexMode stringMode)
{
// 如果只考虑16进制对格式没有特殊要求 可以直接使用 ((byte)233).ToString("X2"); 或 BitConverter.ToString(new byte[]{1,2,3,10,12,233})
if (yourBytes == null)
{
return null;
}
StringBuilder result = new StringBuilder(DictionaryHexDecimal[hexDecimal] + DictionaryShowHexMode[stringMode].Length);
for (int i = 0; i < yourBytes.Length; i++)
{
result.Append(DictionaryShowHexMode[stringMode]);
result.Append(Convert.ToString(yourBytes[i], (int)hexDecimal).PadLeft(DictionaryHexDecimal[hexDecimal], '0'));
}
return result.ToString().Trim();
}
/// <summary>
/// 将可读指定进制的数据转换为字节数组(因为用户数据可能会是非法数据,遇到非法数据非法会抛出异常)
/// </summary>
/// <param name="yourStr">需要转换的字符串</param>
/// <param name="hexDecimal">指定进制</param>
/// <param name="stringMode">指定格式</param>
/// <returns>返回结果(如果yourStr为""返回长度为0的byte[])</returns>
public static byte[] HexStringToByte(string yourStr, HexDecimal hexDecimal, ShowHexMode stringMode)
{
if (hexDecimal == HexDecimal.hex16 && (stringMode == ShowHexMode.spit0b || stringMode == ShowHexMode.spit0d || stringMode == ShowHexMode.spitSpace0b || stringMode == ShowHexMode.spitSpace0d))
{
throw new Exception("your HexaDecimal and ShowHexMode is conflict");
}
string[] hexStrs;
byte[] resultBytes;
string modeStr = string.Empty; //string.Empty 不等于 null
if (stringMode != ShowHexMode.@null)
{
modeStr = DictionaryShowHexMode[stringMode];
}
if (modeStr == string.Empty)
{
if (yourStr.Length % DictionaryHexDecimal[hexDecimal] != 0)
{
throw new Exception("error leng of your data");
}
long tempHexNum = yourStr.Length / DictionaryHexDecimal[hexDecimal];
hexStrs = new string[tempHexNum];
for (int startIndex = 0; startIndex < tempHexNum; startIndex++)
{
hexStrs[startIndex] = yourStr.Substring(startIndex * DictionaryHexDecimal[hexDecimal], DictionaryHexDecimal[hexDecimal]);
}
}
else
{
//使用StringSplitOptions.RemoveEmptyEntries去除空值因为0xFF0xFF可能会有第一个值为空的情况
//对于0xFF 0xFF使用 0x分割,第一个值可能会带0x,不过 Convert.ToByte可以兼容这种情况(不过还是可能带来第一个字节允许使用不应用的分割的情况)
hexStrs = yourStr.Split(new string[] { modeStr }, StringSplitOptions.RemoveEmptyEntries);
}
try
{
resultBytes = new byte[hexStrs.Length];
for (int i = 0; i < hexStrs.Length; i++)
{
resultBytes[i] = Convert.ToByte(hexStrs[i], (int)hexDecimal);
}
}
catch (Exception ex)
{
throw new Exception(string.Format("error data ,can not change your hex string to your hex, hexDecimal[{0}] ShowHexMode[{1}]", hexDecimal, stringMode), ex);
}
return resultBytes;
}
/// <summary>
/// 将可读指定进制的数据转换为字节数组(因为用户数据可能会是非法数据,遇到非法数据非法会抛出异常)(使用猜测的方式发现分割字符串)
/// </summary>
/// <param name="yourStr">需要转换的字符串</param>
/// <param name="hexDecimal">指定进制</param>
/// <returns>返回结果(如果yourStr为""返回长度为0的byte[])</returns>
public static byte[] HexStringToByte(string yourStr, HexDecimal hexDecimal)
{
if (yourStr == null) throw new Exception("your source string is null");
foreach(var tryStringSpitMode in DictionaryShowHexMode)
{
if (hexDecimal == HexDecimal.hex16 && (tryStringSpitMode.Key == ShowHexMode.spit0b || tryStringSpitMode.Key == ShowHexMode.spit0d || tryStringSpitMode.Key == ShowHexMode.spitSpace0b || tryStringSpitMode.Key == ShowHexMode.spitSpace0d)) continue;
if (yourStr.Contains(tryStringSpitMode.Value)) return HexStringToByte(yourStr, hexDecimal, tryStringSpitMode.Key);
}
throw new Exception("unknown exception with HexStringToByte");
}
public static bool ByteToSring(byte[] yourBytes, Encoding yourEncoding, ref string outStr)
{
try
{
outStr = yourEncoding.GetString(yourBytes);
return true;
}
catch
{
return false;
}
}
public static bool StringToByte(string yourStr, Encoding yourEncoding, ref byte[] outBytes)
{
try
{
outBytes = yourEncoding.GetBytes(yourStr);
return true;
}
catch
{
return false;
}
}
#endregion
/// <summary>
/// 比较两个字节数组
/// </summary>
/// <param name="bytesA"></param>
/// <param name="bytesB"></param>
/// <returns></returns>
public static bool IsBytesSame(byte[] bytesA, byte[] bytesB)
{
if (bytesA == null || bytesB == null)
{
return false;
}
if (bytesA.Length == bytesB.Length)
{
for (int i = 0; i < bytesB.Length; i++)
{
if (bytesA[i] != bytesB[i])
{
return false;
}
}
return true;
}
else
{
return false;
}
}
/// <summary>
/// 去除bytes尾部空值
/// </summary>
/// <param name="yourBytes"></param>
/// <returns></returns>
public static byte[] RmBytesEnd(byte[] yourBytes)
{
if (yourBytes == null)
{
return null;
}
int tempLen = yourBytes.Length;
for (int i = yourBytes.Length - 1; i > 0; i--)
{
if (yourBytes[i] == 0x00)
{
tempLen--;
}
else
{
break;
}
}
byte[] tempBytes = new byte[tempLen];
for (int i = 0; i < tempLen; i++)
{
tempBytes[i] = yourBytes[i];
}
return tempBytes;
}
/// <summary>
/// 生成随机字节数组
/// </summary>
/// <param name="byteLen">数组长度</param>
/// <returns>随机字节数组</returns>
public static byte[] CreatRandomBytes(int byteLen)
{
byte[] tempBytes = new byte[byteLen];
for (int i = 0; i < byteLen; i++)
{
Random ran = new Random(Guid.NewGuid().GetHashCode());
{
tempBytes[i] = (byte)ran.Next(0x00, 0xff);
}
}
return tempBytes;
}
/// <summary>
/// i will change your bytes to IP by vanelife way
/// </summary>3
/// <param name="yourData">your bytes</param>
/// <returns>your IP</returns>
public static string GetIpByBytes(byte[] yourData)
{
if (yourData == null)
{
return "null data";
}
if (yourData.Length > 6)
{
return "length error";
}
else
{
string tempIp = "";
for (int i = 0; i < yourData.Length; i++)
{
tempIp += (int)yourData[i] + ".";
}
tempIp = tempIp.TrimEnd(new char[] { '.' });
return tempIp;
}
}
/// <summary>
/// i will change your bytes to int,and bytes can not more than 4 byte(默认 小端序,低位在前,这里使用大端序列,并仅取2字节)
/// </summary>
/// <param name="yourLen">your bytes</param>
/// <returns>your len</returns>
public static int GetByteLen(byte[] yourLen)
{
//return BitConverter.ToUInt16(yourLen,0);
if (yourLen.Length > 4)
{
return -1;
}
else
{
int tempLen = 0;
for (int i = 0; i < yourLen.Length; i++)
{
tempLen += (int)Math.Pow(256, yourLen.Length - i - 1) * yourLen[i];
}
return tempLen;
}
}
/// <summary>
/// i will change a int to byte and change the 1,2(默认 小端序,低位在前,这里使用大端序列,并仅取2字节)
/// </summary>
/// <param name="yourLen">your Len</param>
/// <returns>your bytes</returns>
public static byte[] CreateInt16Bytes(int yourLen)
{
byte[] tempData = BitConverter.GetBytes(yourLen);
byte[] dataToBack = new byte[2];
dataToBack[0] = tempData[1];
dataToBack[1] = tempData[0];
return dataToBack;
//int c = 97;
//byte[] cb = BitConverter.GetBytes(c);//小端
//Array.Reverse(cb);//反转成大端 Reverse() 无返回值直接反转目标
//也可以先把数值转换再转成字节数组
//int c2 = IPAddress.HostToNetworkOrder(c);//大端字节数
//byte[] bb = System.BitConverter.GetBytes(c2);//字节数组
//string s = "code";
//byte[] sbb = Encoding.BigEndianUnicode.GetBytes(s);//大端
//byte[] sbs = Encoding.Unicode.GetBytes(s);//小端
//.NET short 网络大小端转换 一般操作系统文件都是小端,网络传输一般使用大端
//System.Net.IPAddress.HostToNetworkOrder(本机到网络转换)
//System.Net.IPAddress.NetworkToHostOrder(网络字节转成本机)
}
/// <summary>
/// 拼接一组byte[]
/// </summary>
/// <param name="yourByteList">byte[] List</param>
/// <returns>拼接完成的的byte[]</returns>
public static byte[] GroupByteList(List<byte[]> yourByteList)
{
if (yourByteList == null)
{
throw new Exception("yourByteList is null");
}
int byteLen = 0;
int nowCopyIndex = 0;
byte[] outBytes;
foreach (byte[] tempBytes in yourByteList)
{
byteLen += tempBytes.Length;
}
outBytes = new byte[byteLen];
foreach (byte[] tempBytes in yourByteList)
{
Array.Copy(tempBytes, 0, outBytes, nowCopyIndex, tempBytes.Length);
nowCopyIndex += tempBytes.Length;
}
return outBytes;
}
/// <summary>
/// byte[]替换 (如果 搜索目标或替换目标为null,直接返回源数组)
/// </summary>
/// <param name="src">替换源数组</param>
/// <param name="search">需要被替换目标数组</param>
/// <param name="repl">替换进入的数组</param>
/// <returns>完成替换的byte[]</returns>
public static byte[] ReplaceBytes(byte[] src, byte[] search, byte[] repl)
{
if (repl == null) return src;
int index = FindBytes(src, search);
if (index < 0) return src;
byte[] dst = new byte[src.Length - search.Length + repl.Length];
Buffer.BlockCopy(src, 0, dst, 0, index);
Buffer.BlockCopy(repl, 0, dst, index, repl.Length);
Buffer.BlockCopy(src, index + search.Length, dst, index + repl.Length,src.Length - (index + search.Length));
return dst;
}
/// <summary>
/// 在目标数组中查找指定目标第一次出现的索引(没有指定目标返回-1)
/// </summary>
/// <param name="src">查找源</param>
/// <param name="find">需要查找的目标</param>
/// <returns>第一次出现的索引(没有指定目标返回-1)</returns>
public static int FindBytes(byte[] src, byte[] find)
{
if(src==null|| find==null|| src.Length==0|| find.Length == 0 || find.Length> src.Length) return -1;
for (int i = 0; i < src.Length - find.Length +1 ; i++)
{
if (src[i] == find[0])
{
if (find.Length == 1) return i;
for(int m=1;m< find.Length;m++)
{
if (src[i + m] != find[m]) break;
if (m == find.Length - 1) return i;
}
}
}
return -1;
}
}
}
================================================
FILE: AutoTest/MyCommonTool.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest
{
public static class MyCommonTool
{
public static string rootPath = System.Environment.CurrentDirectory;
/// <summary>
/// seed for GenerateRandomStr
/// </summary>
private static int externRandomSeed = 0;
/// <summary>
/// 生成随机字符串
/// </summary>
/// <param name="strCount">字符串长度</param>
/// <param name="GenerateType">生成模式: 0-是有可见ASCII / 1-数字 / 2-大写字母 / 3-小写字母 / 4-特殊字符 / 5-大小写字母 / 6-字母和数字</param>
/// <returns>随机字符串</returns>
public static string GenerateRandomStr(int strCount, int GenerateType)
{
externRandomSeed++;
StringBuilder myRandomStr = new StringBuilder(strCount);
long mySeed = DateTime.Now.Ticks + externRandomSeed;
Random random = new Random((int)(mySeed & 0x0000ffff));
for (int i = 0; i < strCount; i++)
{
char tempCh;
int num = random.Next();
switch (GenerateType)
{
case 1:
tempCh = (char)(0x30 + (num % 10));
break;
case 2:
tempCh = (char)(0x41 + (num % 26));
break;
case 3:
tempCh = (char)(0x61 + (num % 26));
break;
case 4:
int tempValue = 0x20 + ((num % 95));
if ((tempValue >= 0x30 && tempValue <= 0x39) || (tempValue >= 0x41 && tempValue <= 0x5a) || (tempValue >= 0x61 && tempValue <= 0x7a))
{
i--;
continue;
}
else
{
tempCh = (char)tempValue;
}
break;
case 5:
tempValue = 0x20 + ((num % 95));
if ((tempValue >= 0x41 && tempValue <= 0x5a) || (tempValue >= 0x61 && tempValue <= 0x7a))
{
tempCh = (char)tempValue;
}
else
{
i--;
continue;
}
break;
case 6:
tempValue = 0x20 + ((num % 95));
if ((tempValue >= 0x30 && tempValue <= 0x39) || (tempValue >= 0x41 && tempValue <= 0x5a) || (tempValue >= 0x61 && tempValue <= 0x7a))
{
tempCh = (char)tempValue;
}
else
{
i--;
continue;
}
break;
default:
tempCh = (char)(0x20 + (num % 95));
break;
}
myRandomStr.Append(tempCh);
}
return myRandomStr.ToString();
}
}
}
================================================
FILE: AutoTest/MyExtensionMethods.cs
================================================
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest
{
public static class MyExtensionMethods
{
/// <summary>
/// 以指定字符将字符串分割并转换为int(eg: "10-11-12-13")
/// </summary>
/// <param name="str">指定字符串</param>
/// <param name="yourSplitChar">分割字符</param>
/// <param name="yourIntArray">转换结果</param>
/// <returns>是否成功(任意一个转换失败都会返回False)</returns>
public static bool MySplitToIntArray(this string str, char yourSplitChar, out int[] yourIntArray)
{
yourIntArray = null;
if (str == null)
{
return false;
}
string[] strArray = str.Split(new char[] { yourSplitChar }, StringSplitOptions.None);
yourIntArray = new int[strArray.Length];
for (int i = 0; i < strArray.Length; i++)
{
if (!int.TryParse(strArray[i], out yourIntArray[i]))
{
return false;
}
}
return true;
}
/// <summary>
/// 以指定字符将字符串中末尾int数据提取出来(eg: "testdata-10")
/// </summary>
/// <param name="str">指定字符串</param>
/// <param name="yourSplitChar">分割字符</param>
/// <param name="yourStr">提取后的前半截字符串</param>
/// <param name="yourInt">提取后的int</param>
/// <returns>是否成功 int转换失败后也返回错误</returns>
public static bool MySplitIntEnd(this string str, char yourSplitChar, out string yourStr, out int yourInt)
{
yourStr = null;
yourInt = 0;
if (str == null)
{
return false;
}
if (str.Contains(yourSplitChar))
{
int lastSplitCharIndex = str.LastIndexOf(yourSplitChar);
if (lastSplitCharIndex == str.Length - 1) // 如果使用endwith会产生多余的string对象
{
return false;
}
if (int.TryParse(str.Substring(lastSplitCharIndex + 1, str.Length - lastSplitCharIndex - 1), out yourInt))
{
yourStr = str.Substring(0, lastSplitCharIndex);
return true;
}
}
return false;
}
/// <summary>
/// 添加键值,若遇到已有key则覆盖
/// </summary>
/// <param name="dc">Dictionary</param>
/// <param name="yourKey">Key</param>
/// <param name="yourValue">Value</param>
public static void MyAdd(this Dictionary<string, string> dc, string yourKey, string yourValue)
{
if (dc.ContainsKey(yourKey))
{
dc[yourKey] = yourValue;
}
else
{
dc.Add(yourKey, yourValue);
}
}
/// <summary>
/// 添加键值,若遇到已有key则覆盖
/// </summary>
/// <typeparam name="T">T Type</typeparam>
/// <param name="dc">Dictionary</param>
/// <param name="yourKey">yourKey</param>
/// <param name="yourValue">yourValue</param>
public static void MyAdd<T>(this Dictionary<string, T> dc, string yourKey, T yourValue)
{
if (dc.ContainsKey(yourKey))
{
dc[yourKey] = yourValue;
}
else
{
dc.Add(yourKey, yourValue);
}
}
/// <summary>
/// 【NameValueCollection】添加键值,检查NameValueCollection是否为null
/// </summary>
/// <param name="nvc">NameValueCollection</param>
/// <param name="yourKey">Key</param>
/// <param name="yourValue">Value</param>
public static void MyAdd(this NameValueCollection nvc, string yourName, string yourValue)
{
if (nvc != null)
{
nvc.Add(yourName, yourValue);
}
}
/// <summary>
/// 转换为{[key:value][key:value].......}
/// </summary>
/// <param name="nvc">NameValueCollection</param>
/// <returns>{[key:value][key:value].......}</returns>
public static string MyToFormatString(this NameValueCollection nvc)
{
if (nvc != null)
{
if (nvc.Count > 0)
{
if (nvc.Count < 2)
{
return string.Format("{{ [{0}:{1}] }}", nvc.Keys[0], nvc[nvc.Keys[0]]);
}
else
{
StringBuilder tempStrBld = new StringBuilder("{ ", nvc.Count * 32);
foreach (string tempKey in nvc.Keys)
{
tempStrBld.AppendFormat("[{0}:{1}] ", tempKey, nvc[tempKey]);
}
tempStrBld.Append("}");
return tempStrBld.ToString();
}
}
}
return "";
}
/// <summary>
/// 返回对象的深度克隆(泛型数据,要求T必须为值类型,或类似string的特殊引用类型[因为虽然使用string的克隆会有相同的引用,但对string进行修改的时都会创建新的对象])
/// </summary>
/// <typeparam name="TKey">TKey</typeparam>
/// <typeparam name="TValue">TKey</typeparam>
/// <param name="dc">目标Dictionary</param>
/// <returns>对象的深度克隆</returns>
public static Dictionary<TKey, TValue> MyClone<TKey, TValue>(this Dictionary<TKey, TValue> dc)
{
Dictionary<TKey, TValue> cloneDc = new Dictionary<TKey, TValue>();
foreach (KeyValuePair<TKey, TValue> tempKvp in dc)
{
cloneDc.Add(tempKvp.Key, tempKvp.Value);
}
return cloneDc;
}
/// <summary>
/// 返回对象的深度克隆(泛型数据,要求T必须为值类型,或类似string的特殊引用类型[因为虽然使用string的克隆会有相同的引用,但对string进行修改的时都会创建新的对象](该重载可以约束支持clone的TValue))
/// </summary>
/// <typeparam name="TKey">TKey</typeparam>
/// <typeparam name="TValue">TKey</typeparam>
/// <param name="dc">目标Dictionary</param>
/// <returns>对象的深度克隆</returns>
public static Dictionary<TKey, TValue> MyDeepClone<TKey, TValue>(this Dictionary<TKey, TValue> dc) where TValue : ICloneable
{
Dictionary<TKey, TValue> cloneDc = new Dictionary<TKey, TValue>();
foreach (KeyValuePair<TKey, TValue> tempKvp in dc)
{
cloneDc.Add(tempKvp.Key, (TValue)tempKvp.Value.Clone());
}
return cloneDc;
}
public static Dictionary<string, TTargetValue> ToChangeType<TValue,TTargetValue>(this Dictionary<string, TValue> dc) where TValue : TTargetValue
{
if(dc!=null)
{
Dictionary<string, TTargetValue> newDc = new Dictionary<string, TTargetValue>();
foreach(var item in dc)
{
newDc.Add(item.Key, item.Value);
}
return newDc;
}
return null;
}
public static void Add(this List<List<string>> myList, object[] yourValue)
{
if(yourValue!=null)
{
List<string> tempAddList = new List<string>(yourValue.Length);
for(int i =0 ; i<yourValue.Length;i++)
{
//tempAddList.Add((yourValue[i] is System.DBNull)?"":(string)yourValue[i]);
tempAddList.Add((yourValue[i] is string) ? (string)yourValue[i]:"");
}
myList.Add(tempAddList);
}
}
}
}
================================================
FILE: AutoTest/ParameterizationContent/CaseParameterizationContent.cs
================================================
using FreeHttp.AutoTest.RunTimeStaticData;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.ParameterizationContent
{
/// <summary>
/// 描述可参数化数据结构 (请尽量不要自行解析数据,建议使用getXmlParametContent解析xml数据)
/// </summary>
[Serializable]
public class CaseParameterizationContent
{
public string contentData;
public bool hasParameter;
public ParameterizationContentEncodingType encodetype;
public CaseParameterizationContent()
{
contentData=null;
hasParameter = false;
encodetype = ParameterizationContentEncodingType.encode_default;
}
public CaseParameterizationContent(string yourContentData, bool isParameter)
{
contentData = yourContentData;
hasParameter = isParameter;
encodetype = ParameterizationContentEncodingType.encode_default;
}
public CaseParameterizationContent(string yourContentData)
{
contentData = yourContentData;
hasParameter = false;
encodetype = ParameterizationContentEncodingType.encode_default;
}
/// <summary>
///返回一个值指示该caseParameterizationContent是否有被任何数据填充过
/// </summary>
/// <returns></returns>
public bool IsFilled()
{
if (contentData != null)
{
if (contentData != "")
{
return true;
}
}
return false;
}
/// <summary>
/// 获取运算后的值,掉用此法的该版本的重载将会改变涉及到的staticData数据的游标
/// </summary>
/// <param name="yourActuatorStaticDataCollection">可用staticData集合</param>
/// <param name="yourDataResultCollection">返回对所有staticData数据运算后的结果列表</param>
/// <param name="errorMessage">错误消息(如果没有错误则为null)(在获取参数化数据产生错误后因对当前case设置警示)</param>
/// <returns>运算结果</returns>
public string GetTargetContentData(ActuatorStaticDataCollection yourActuatorStaticDataCollection, NameValueCollection yourDataResultCollection, out string errorMessage)
{
string myTargetContentData = contentData;
errorMessage = null;
if (hasParameter)
{
myTargetContentData = ParameterizationContentHelper.GetCurrentParametersData(contentData, MyConfiguration.ParametersDataSplitStr, yourActuatorStaticDataCollection, yourDataResultCollection, out errorMessage);
}
if (encodetype != ParameterizationContentEncodingType.encode_default)
{
switch (encodetype)
{
//base64
case ParameterizationContentEncodingType.encode_base64:
myTargetContentData = Convert.ToBase64String(Encoding.UTF8.GetBytes(myTargetContentData));
break;
case ParameterizationContentEncodingType.decode_base64:
try
{
myTargetContentData = Encoding.UTF8.GetString(Convert.FromBase64String(myTargetContentData));
}
catch (Exception ex)
{
myTargetContentData = "ContentEncoding Error:" + ex.Message;
}
break;
//hex 16
case ParameterizationContentEncodingType.encode_hex16:
myTargetContentData = MyBytes.StringToHexString(myTargetContentData);
break;
case ParameterizationContentEncodingType.decode_hex16:
try
{
byte[] nowBytes = MyBytes.HexStringToByte(myTargetContentData, HexDecimal.hex16, ShowHexMode.space);
myTargetContentData = Encoding.UTF8.GetString(nowBytes);
}
catch (Exception ex)
{
myTargetContentData = "ContentEncoding Error:" + ex.Message;
}
break;
//hex 2
case ParameterizationContentEncodingType.encode_hex2:
myTargetContentData = MyBytes.StringToHexString(myTargetContentData, Encoding.UTF8, HexDecimal.hex2, ShowHexMode.space);
break;
case ParameterizationContentEncodingType.decode_hex2:
try
{
byte[] nowBytes = MyBytes.HexStringToByte(myTargetContentData, HexDecimal.hex2, ShowHexMode.space);
myTargetContentData = Encoding.UTF8.GetString(nowBytes);
}
catch (Exception ex)
{
myTargetContentData = "ContentEncoding Error:" + ex.Message;
}
break;
default:
errorMessage = "[getTargetContentData] unknow or not supported this encodetype";
break;
}
}
return myTargetContentData;
}
/// <summary>
/// 获取原始数据,掉用此法的该版本的重载将不会会改变涉及到的staticData数据的游标,也不会对其进行运算
/// </summary>
/// <returns>原始数据数据</returns>
public string GetTargetContentData()
{
return contentData;
}
public override string ToString()
{
return contentData;
}
}
}
================================================
FILE: AutoTest/ParameterizationContent/ParameterizationContentEncodingType.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.ParameterizationContent
{
/// <summary>
/// 描述[caseParameterizationContent]使用的数据附加编码类型,0标识不进行操作,基数encode偶数decode
/// </summary>
[Serializable]
public enum ParameterizationContentEncodingType
{
encode_default = 0,
encode_base64 = 1,
decode_base64 = 2,
encode_hex16 = 3,
decode_hex16 = 4,
encode_hex2 = 5,
decode_hex2 = 6
}
}
================================================
FILE: AutoTest/ParameterizationContent/ParameterizationContentHelper.cs
================================================
using FreeHttp.AutoTest.RunTimeStaticData;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.ParameterizationContent
{
public static class ParameterizationContentHelper
{
//仅用于【caseParameterizationContent】内部
//如果没有任何valid identification,直接返回原始数据,不报错(为实现最大兼容)
/// <summary>
/// get the getTargetContentData in caseParameterizationContent
/// </summary>
/// <param name="yourSourceData">Source Data</param>
/// <param name="yourParameterList">ParameterList</param>
/// <param name="yourStaticDataList">StaticDataList</param>
/// <param name="errorMessage">error Message</param>
/// <returns></returns>
public static string GetCurrentParametersData(string yourSourceData, string splitStr, ActuatorStaticDataCollection yourActuatorStaticDataCollection, NameValueCollection yourDataResultCollection, out string errorMessage)
{
errorMessage = null;
if (yourSourceData.Contains(splitStr))
{
var yourParameterList = yourActuatorStaticDataCollection.RunActuatorStaticDataKeyList;
var yourStaticDataList = yourActuatorStaticDataCollection.RunActuatorStaticDataParameterList;
var yourStaticDataSourceList = yourActuatorStaticDataCollection.RunActuatorStaticDataSouceList;
int tempStart, tempEnd = 0;
string tempKeyVaule = null;
string keyParameter = null;
string keyAdditionData = null;
string tempVaule = null;
while (yourSourceData.Contains(splitStr))
{
tempStart = yourSourceData.IndexOf(splitStr);
tempEnd = yourSourceData.IndexOf(splitStr, tempStart + splitStr.Length);
if (tempEnd == -1)
{
errorMessage = string.Format("the identification not enough in Source[{0}]", yourSourceData);
return yourSourceData;
}
tempKeyVaule = yourSourceData.Substring(tempStart + splitStr.Length, tempEnd - (tempStart + splitStr.Length));
keyParameter = TryGetParametersAdditionData(tempKeyVaule, out keyAdditionData);
if (keyAdditionData != null)
{
keyAdditionData = GetCurrentParametersData(keyAdditionData, MyConfiguration.ParametersExecuteSplitStr, yourActuatorStaticDataCollection, yourDataResultCollection, out errorMessage);
}
Func<string> DealErrorAdditionData = () =>
{
tempVaule = "[ErrorData]";
return string.Format("ParametersAdditionData error find in the runTime data with keyParameter:[{0}] keyAdditionData:[{1}]", keyParameter, keyAdditionData);
};
#region RunTimeStaticKey
if (yourParameterList.Keys.Contains(keyParameter))
{
//RunTimeParameter 不含有参数信息,所以不处理keyParameter
tempVaule = yourParameterList[keyParameter].DataCurrent();
yourSourceData = yourSourceData.Replace(splitStr + tempKeyVaule + splitStr, tempVaule);
yourDataResultCollection.MyAdd(tempKeyVaule, tempVaule);
}
#endregion
#region RunTimeStaticParameter
else if (yourStaticDataList.Keys.Contains(keyParameter))
{
if (keyAdditionData == null)
{
tempVaule = yourStaticDataList[keyParameter].DataCurrent();
}
else if (keyAdditionData == "=")
{
tempVaule = yourStaticDataList[keyParameter].DataCurrent();
}
else if (keyAdditionData == "+")
{
tempVaule = yourStaticDataList[keyParameter].DataMoveNext();
}
else if (keyAdditionData.StartsWith("+")) //+10 前移10
{
int tempTimes;
if (int.TryParse(keyAdditionData.Remove(0, 1), out tempTimes))
{
if (tempTimes > 0)
{
for (int i = 0; i < tempTimes; i++)
{
yourStaticDataList[keyParameter].DataMoveNext();
}
tempVaule = yourStaticDataList[keyParameter].DataCurrent();
}
else
{
errorMessage = DealErrorAdditionData();
}
}
else
{
errorMessage = DealErrorAdditionData();
}
}
else
{
errorMessage = DealErrorAdditionData();
}
yourSourceData = yourSourceData.Replace(splitStr + tempKeyVaule + splitStr, tempVaule);
yourDataResultCollection.MyAdd(tempKeyVaule, tempVaule);
}
#endregion
#region RunTimeStaticDataSource
else if (yourStaticDataSourceList.Keys.Contains(keyParameter))
{
if (keyAdditionData == null)
{
tempVaule = yourStaticDataSourceList[tempKeyVaule].DataCurrent();
}
else if (keyAdditionData == "=")
{
tempVaule = yourStaticDataSourceList[keyParameter].DataCurrent();
}
else if (keyAdditionData == "+")
{
tempVaule = yourStaticDataSourceList[keyParameter].DataMoveNext();
}
else if (keyAdditionData.StartsWith("+")) //+10 前移10
{
int tempTimes;
if (int.TryParse(keyAdditionData.Remove(0, 1), out tempTimes))
{
if (tempTimes > 0)
{
for (int i = 0; i < tempTimes; i++)
{
yourStaticDataSourceList[keyParameter].DataMoveNext();
}
tempVaule = yourStaticDataSourceList[keyParameter].DataCurrent();
}
else
{
errorMessage = DealErrorAdditionData();
}
}
else
{
errorMessage = DealErrorAdditionData();
}
}
else
{
tempVaule = yourStaticDataSourceList[keyParameter].GetDataVaule(keyAdditionData);
if (tempVaule == null)
{
errorMessage = DealErrorAdditionData();
}
}
yourSourceData = yourSourceData.Replace(splitStr + tempKeyVaule + splitStr, tempVaule);
yourDataResultCollection.MyAdd(tempKeyVaule, tempVaule);
}
#endregion
else
{
tempVaule = "[ErrorData]";
errorMessage = string.Format("can not find your key [{0}] in StaticDataList", keyParameter);
yourSourceData = yourSourceData.Replace(splitStr + tempKeyVaule + splitStr, tempVaule);
yourDataResultCollection.MyAdd(tempKeyVaule, tempVaule);
}
}
}
return yourSourceData;
}
/// <summary>
/// 处理ParametersData,解析静态数据名及其参数
/// </summary>
/// <param name="souceData">souce parameter data 原数据</param>
/// <param name="additionData">返回辅助参数数据,若没有或无法解析返回null</param>
/// <returns></returns>
private static string TryGetParametersAdditionData(string souceData, out string additionData)
{
additionData = null;
string parametersData = null;
if (souceData != null)
{
if (souceData.EndsWith(")"))
{
int startIndex = souceData.LastIndexOf('(');
if (startIndex > 0)
{
parametersData = souceData.Remove(startIndex);
additionData = souceData.Substring(startIndex + 1, souceData.Length - startIndex - 2);
}
else
{
parametersData = souceData;
}
}
else
{
parametersData = souceData;
}
}
return parametersData;
}
}
public class MyConfiguration
{
//◎●◐◑◒◓◔◕◖◗▼▲
public static string ParametersDataSplitStr = "*#"; //参数化数据分隔符
public static string ParametersExecuteSplitStr = "`"; //参数再运算风格符
public static string CaseShowTargetAndContent = "➤";
public static string CaseShowCaseNodeStart = "◆";
public static string CaseShowJumpGotoNode = "▼";
public static string CaseShowGotoNodeStart = "▲";
}
}
================================================
FILE: AutoTest/ParameterizationPick/ParameterPick.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.ParameterizationPick
{
[Serializable]
[DataContract]
public class ParameterPick
{
[DataMember]
public string ParameterName { get; set; }
[DataMember]
public ParameterPickType PickType { get; set; }
[DataMember]
public ParameterPickRange PickRange { get; set; }
[DataMember]
public string PickTypeAdditional { get; set; }
[DataMember]
public string PickTypeExpression { get; set; }
public override string ToString()
{
return string.Format("get [{0}] from [{1}] by [{2} grep]({3}) with [{4}]", ParameterName, PickRange.ToString(), PickType.ToString(), PickTypeAdditional, PickTypeExpression);
}
}
public class ParameterPickInfo
{
public ParameterPickType PickType{get;private set;}
public List<KeyValuePair<string, string>> PickTypeAdditionalList { get; private set; }
public bool Editable { get; private set; }
public Func<string,string, string, string> ParameterPickFunc { get; private set; }
public ParameterPickInfo(ParameterPickType pickType, List<KeyValuePair<string, string>> pickTypeAdditionalList, bool editable, Func<string,string, string, string> parameterPickFunc)
{
PickType = pickType;
PickTypeAdditionalList = pickTypeAdditionalList;
Editable = editable;
ParameterPickFunc = parameterPickFunc;
}
}
public class ParameterPickTypeEngine
{
public static Dictionary<ParameterPickType, ParameterPickInfo> dictionaryParameterPickFunc = new Dictionary<ParameterPickType, ParameterPickInfo>() {
{ParameterPickType.Str , new ParameterPickInfo(ParameterPickType.Str,new List<KeyValuePair<string,string>>(){new KeyValuePair<string,string>("str-str","StartString-EndString"),new KeyValuePair<string,string>("str-len","StartString-StringLength"),new KeyValuePair<string,string>("index-len","StartIndex-StringLength")},false,ParameterPickHelper.ParameterPickStr)},
{ParameterPickType.Regex , new ParameterPickInfo(ParameterPickType.Regex,new List<KeyValuePair<string,string>>(){new KeyValuePair<string,string>("1","RegexExpression"),new KeyValuePair<string,string>("0","RegexExpression")},true,ParameterPickHelper.ParameterPickRegex)},
{ParameterPickType.Xml , new ParameterPickInfo(ParameterPickType.Xml,new List<KeyValuePair<string,string>>(){new KeyValuePair<string,string>("1","XpathExpression"),new KeyValuePair<string,string>("0","XpathExpression")},true,ParameterPickHelper.ParameterPickXml)}
};
}
}
================================================
FILE: AutoTest/ParameterizationPick/ParameterPickHelper.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Xml;
namespace FreeHttp.AutoTest.ParameterizationPick
{
public class ParameterPickHelper
{
/// <summary>
/// 使用xpth查找xml匹配项
/// </summary>
/// <param name="yourTarget">xpth表达式 (如//从匹配选择的当前节点选择文档中的节点,而不考虑它们的位置)</param>
/// <param name="yourSouce">数据源</param>
/// <returns>返回结果(结果为XmlNodeList的InnerXml字符串数组)</returns>
public static string[] PickXmlParameter(string yourTarget, string yourSouce)
{
XmlDocument xml = new XmlDocument();
try
{
xml.LoadXml(yourSouce);
}
catch (Exception)
{
return null;
}
XmlNodeList tempNodeList;
try
{
tempNodeList = xml.SelectNodes("//" + yourTarget);
}
catch (Exception)
{
return null;
}
if (tempNodeList.Count > 0)
{
string[] backStrs = new string[tempNodeList.Count];
for (int i = 0; i < tempNodeList.Count; i++)
{
backStrs[i] = tempNodeList[i].InnerXml;
}
return backStrs;
}
return null;
}
public static string[] PickRegexParameter(string yourTarget, string yourSouce)
{
MatchCollection mc;
try
{
mc = Regex.Matches(yourSouce, yourTarget);
}
catch (Exception )
{
return null;
}
if (mc.Count > 0)
{
string[] backStrs = new string[mc.Count];
for (int i = 0; i < mc.Count; i++)
{
backStrs[i] = mc[i].Value;
}
return backStrs;
}
return null;
}
public static string PickStrParameter(int yourStrStart, int yourStrLen, string yourSouce)
{
if (yourStrStart < 0 || yourStrLen < 0)
{
return null;
}
if (yourSouce.Length >= yourStrStart + yourStrLen)
{
if (yourStrLen==0)
{
return yourSouce.Remove(0, yourStrStart);
}
return yourSouce.Substring(yourStrStart, yourStrLen);
}
return null;
}
public static string PickStrParameter(string yourTarget, int yourStrLen, string yourSouce)
{
if (yourStrLen < 0)
{
return null;
}
if (yourSouce.Contains(yourTarget))
{
string tempPickStr;
int tempStart = yourSouce.IndexOf(yourTarget) + yourTarget.Length;
tempPickStr = yourSouce.Remove(0, tempStart);
if (tempPickStr.Length > yourStrLen)
{
if (yourStrLen != 0)
{
tempPickStr = tempPickStr.Remove(yourStrLen);
}
}
return tempPickStr;
}
return null;
}
public static string PickStrParameter(string yourTarget, string yourStrEnd, string yourSouce)
{
if (yourSouce.Contains(yourTarget))
{
string tempPickStr;
int tempStart = yourSouce.IndexOf(yourTarget) + yourTarget.Length;
tempPickStr = yourSouce.Remove(0, tempStart);
if (tempPickStr.Contains(yourStrEnd))
{
int tempEnd = tempPickStr.IndexOf(yourStrEnd);
tempPickStr = tempPickStr.Remove(tempEnd);
return tempPickStr;
}
}
return null;
}
public static bool GetStrPickData(string yourSouce, out string yourFrontTarget, out string yourBackStr)
{
yourFrontTarget = null;
yourBackStr = null;
if (yourSouce.Contains("-"))
{
yourFrontTarget = yourSouce.Remove(yourSouce.LastIndexOf("-"));
yourBackStr = yourSouce.Remove(0, yourSouce.LastIndexOf("-") + 1);
return true;
}
else
{
yourFrontTarget = yourSouce;
}
return false;
}
public static string ParameterPickStr(string sourceStr,string pickExpression,string pickExpressionAdditional)
{
if (string.IsNullOrEmpty(sourceStr) || string.IsNullOrEmpty(pickExpression) || string.IsNullOrEmpty(pickExpressionAdditional))
{
throw new Exception("your ParameterPick data is null or empty");
}
string frontStr;
string backStr;
int frontIndex;
int strLen;
if (!GetStrPickData(pickExpression, out frontStr, out backStr))
{
throw new Exception( string.Format("this Expressions error :{0}", "it should contain '-'"));
}
if (string.IsNullOrEmpty(frontStr) || string.IsNullOrEmpty(backStr))
{
throw new Exception( string.Format("this Expressions error :{0}", "the '-' position is illegal"));
}
switch(pickExpressionAdditional)
{
case "str-str":
return PickStrParameter(frontStr, backStr, sourceStr);
case "str-len":
if(!int.TryParse(backStr,out strLen))
{
throw new Exception(string.Format("this Expressions error :{0}", "the len should be a int value"));
}
return PickStrParameter(frontStr, strLen, sourceStr);
case "index-len":
if (!int.TryParse(backStr, out strLen) )
{
throw new Exception(string.Format("this Expressions error :{0}", "the len should be a int value"));
}
if(!int.TryParse(frontStr, out frontIndex))
{
throw new Exception(string.Format("this Expressions error :{0}", "the index should be a int value"));
}
return PickStrParameter(frontIndex, strLen, sourceStr);
default:
throw new Exception("your ParameterPick data is null or empty");
}
}
public static string ParameterPickXml(string sourceStr, string pickExpression, string pickExpressionAdditional)
{
if (string.IsNullOrEmpty(sourceStr) || string.IsNullOrEmpty(pickExpression) || string.IsNullOrEmpty(pickExpressionAdditional))
{
throw new Exception("your ParameterPick data is null or empty");
}
int returnIndex;
if (!int.TryParse(pickExpressionAdditional, out returnIndex))
{
throw new Exception("this PickTypeAdditional should be a number");
}
if (returnIndex<0)
{
throw new Exception("this PickTypeAdditional should greater than 0");
}
string[] returnArray = PickXmlParameter(pickExpressionAdditional, sourceStr);
if (returnArray==null)
{
return null;
}
if (returnIndex==0)
{
return string.Join(",", returnArray);
}
else if (returnIndex > returnArray.Length)
{
return null;
}
else
{
return returnArray[returnIndex - 1];
}
}
public static string ParameterPickRegex(string sourceStr, string pickExpression, string pickExpressionAdditional)
{
{
if (string.IsNullOrEmpty(sourceStr) || string.IsNullOrEmpty(pickExpression) || string.IsNullOrEmpty(pickExpressionAdditional))
{
throw new Exception("your ParameterPick data is null or empty");
}
int returnIndex;
if (!int.TryParse(pickExpressionAdditional, out returnIndex))
{
throw new Exception("this PickTypeAdditional should be a number");
}
if (returnIndex < 0)
{
throw new Exception("this PickTypeAdditional should greater than 0");
}
string[] returnArray = PickRegexParameter(pickExpression, sourceStr);
if (returnArray == null)
{
return null;
}
if (returnIndex == 0)
{
return string.Join(",", returnArray);
}
else if (returnIndex > returnArray.Length)
{
return null;
}
else
{
return returnArray[returnIndex - 1];
}
}
}
public static string CheckParameterPickExpression(ParameterPick yourParameterPick)
{
if (string.IsNullOrEmpty(yourParameterPick.PickTypeExpression))
{
return "your Expression is empty";
}
switch (yourParameterPick.PickType)
{
case ParameterPickType.Regex:
int tempAdditionalIndex;
if (int.TryParse(yourParameterPick.PickTypeAdditional, out tempAdditionalIndex))
{
if (tempAdditionalIndex < 0)
{
return "this PickTypeAdditional should greater than 0";
}
}
else
{
return "this PickTypeAdditional should be a number";
}
try
{
System.Text.RegularExpressions.Regex.Matches("", yourParameterPick.PickTypeExpression);
}
catch (Exception ex)
{
return string.Format("this Regex Expressions error :{0}", ex.Message);
}
break;
case ParameterPickType.Xml:
if (int.TryParse(yourParameterPick.PickTypeAdditional, out tempAdditionalIndex))
{
if (tempAdditionalIndex < 0)
{
return "this PickTypeAdditional should greater than 0";
}
}
else
{
return "this PickTypeAdditional should be a number";
}
try
{
XmlDocument xml = new XmlDocument();
xml.LoadXml("<example/>");
xml.SelectSingleNode(yourParameterPick.PickTypeExpression);
}
catch (Exception ex)
{
return string.Format("this Xpath Expressions error :{0}", ex.Message);
}
break;
case ParameterPickType.Str:
string frontStr;
string backStr;
if (!GetStrPickData(yourParameterPick.PickTypeExpression, out frontStr, out backStr))
{
return string.Format("this Expressions error :{0}", "it should contain '-'");
}
if (string.IsNullOrEmpty(frontStr) || string.IsNullOrEmpty(backStr))
{
return string.Format("this Expressions error :{0}", "the '-' position is illegal");
}
if (yourParameterPick.PickTypeAdditional == "str-str")
{
}
else if (yourParameterPick.PickTypeAdditional == "str-len")
{
if (!int.TryParse(backStr, out tempAdditionalIndex))
{
return string.Format("this Expressions error :{0}", "the len should be a int value");
}
}
else if (yourParameterPick.PickTypeAdditional == "index-len")
{
if (!int.TryParse(frontStr, out tempAdditionalIndex))
{
return string.Format("this Expressions error :{0}", "the index should be a int value");
}
if (!int.TryParse(backStr, out tempAdditionalIndex))
{
return string.Format("this Expressions error :{0}", "the len should be a int value");
}
}
break;
default:
return "unknow ParameterPickType";
}
return null;
}
}
}
================================================
FILE: AutoTest/ParameterizationPick/ParameterPickType.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.ParameterizationPick
{
[Serializable]
public enum ParameterPickType
{
Str,
Xml,
Regex
}
[Serializable]
public enum ParameterPickRange
{
Line,
Heads,
Entity
}
}
================================================
FILE: AutoTest/RunTimeStaticData/ActuatorStaticDataCollection.cs
================================================
using FreeHttp.AutoTest.RunTimeStaticData.MyStaticData;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData
{
/// <summary>
/// ActuatorStaticData 集合
/// </summary>
[DataContract] //[Serializable] 默认序列化公开字段及属性,且要求其有公开的Set,用[DataContract]指没有这个限制,使用 [DataMember(Name = "ID")] / [DataMember] 标记成员
[KnownType(typeof(MyStaticDataValue)), KnownType(typeof(MyStaticDataIndex)), KnownType(typeof(MyStaticDataList)), KnownType(typeof(MyStaticDataLong)), KnownType(typeof(MyStaticDataNowTime)), KnownType(typeof(MyStaticDataRandomStr)), KnownType(typeof(MyStaticDataSourceCsv)), KnownType(typeof(MyStaticDataStrIndex))]
public class ActuatorStaticDataCollection : IDisposable, ICloneable ,IEnumerable
{
public class ChangeDataEventArgs : EventArgs
{
public bool IsAddOrDel { get; set; }
public ChangeDataEventArgs(bool isAddOrDel)
{
IsAddOrDel = isAddOrDel;
}
}
[DataMember]
public bool IsAllCollectionKeyUnique { get; private set; }
//3组数据源Dictionary都分别实现了_version版本控制,这里可以不用单独实现了
private int _version;
/// <summary>
/// is all staticdata list is empty in ActuatorStaticDataCollection
/// </summary>
public bool IsEmpty
{
get
{
if (runActuatorStaticDataKeyList != null && runActuatorStaticDataKeyList.Count > 0) return false;
if (runActuatorStaticDataParameterList != null && runActuatorStaticDataParameterList.Count > 0) return false;
if (runActuatorStaticDataSouceList != null && runActuatorStaticDataSouceList.Count > 0) return false;
return true;
}
}
public int Count
{
get
{
int tempCount = 0;
if (runActuatorStaticDataKeyList != null) tempCount += runActuatorStaticDataKeyList.Count;
if (runActuatorStaticDataParameterList != null) tempCount += runActuatorStaticDataParameterList.Count;
if (runActuatorStaticDataSouceList != null) tempCount += runActuatorStaticDataSouceList.Count;
return tempCount;
}
}
/// <summary>
/// RunTimeParameter List
/// </summary>
[DataMember]
private Dictionary<string, IRunTimeStaticData> runActuatorStaticDataKeyList;
/// <summary>
/// RunTimeStaticData List
/// </summary>
[DataMember]
private Dictionary<string, IRunTimeStaticData> runActuatorStaticDataParameterList;
/// <summary>
/// RunTimeDataSouce List
/// </summary>
[DataMember]
private Dictionary<string, IRunTimeDataSource> runActuatorStaticDataSouceList;
private readonly object padlock = new object();
public ActuatorStaticDataCollection()
{
runActuatorStaticDataKeyList = new Dictionary<string, IRunTimeStaticData>();
runActuatorStaticDataParameterList = new Dictionary<string, IRunTimeStaticData>();
runActuatorStaticDataSouceList = new Dictionary<string, IRunTimeDataSource>();
IsAllCollectionKeyUnique = false;
}
public ActuatorStaticDataCollection(bool isAllCollectionKeyUnique):this()
{
IsAllCollectionKeyUnique = isAllCollectionKeyUnique;
}
public ActuatorStaticDataCollection(Dictionary<string, IRunTimeStaticData> yourActuatorParameterList, Dictionary<string, IRunTimeStaticData> yourActuatorStaticDataList, Dictionary<string, IRunTimeDataSource> yourActuatorStaticDataSouceList)
{
runActuatorStaticDataKeyList = yourActuatorParameterList;
runActuatorStaticDataParameterList = yourActuatorStaticDataList;
runActuatorStaticDataSouceList = yourActuatorStaticDataSouceList;
IsAllCollectionKeyUnique = false;
}
//public event EventHandler OnChangeCollection;
public delegate void ChangeCollectionEventHandler(object sender, ChangeDataEventArgs e);
public event ChangeCollectionEventHandler OnChangeCollection;
private void OnListChanged(bool isAddOrDel)
{
_version++;
if (OnChangeCollection!=null)
{
this.OnChangeCollection(this, new ChangeDataEventArgs(isAddOrDel));
}
}
/// <summary>
/// Get RunActuatorStaticDataKeyList (do not modify this dictionary yourselves, you can call
/// [AddStaticDataKey][AddStaticDataParameter][AddStaticDataParameter][RemoveStaticData][SetStaticDataValue]do that)
/// </summary>
public Dictionary<string, IRunTimeStaticData> RunActuatorStaticDataKeyList
{
get { return runActuatorStaticDataKeyList; }
}
/// <summary>
/// Get RunActuatorStaticDataParameterList (do not modify this dictionary yourselves, you can call
/// [AddStaticDataKey][AddStaticDataParameter][AddStaticDataParameter][RemoveStaticData][SetStaticDataValue]do that)
/// </summary>
public Dictionary<string, IRunTimeStaticData> RunActuatorStaticDataParameterList
{
get { return runActuatorStaticDataParameterList; }
}
/// <summary>
/// Get RunActuatorStaticDataSouceList (do not modify this dictionary yourselves, you can call
/// [AddStaticDataKey][AddStaticDataParameter][AddStaticDataParameter][RemoveStaticData][SetStaticDataValue]do that)
/// </summary>
public Dictionary<string, IRunTimeDataSource> RunActuatorStaticDataSouceList
{
get { return runActuatorStaticDataSouceList; }
}
private object IsHasSameKey(string key, int ignoreListIndex)
{
if (runActuatorStaticDataKeyList.ContainsKey(key) && ignoreListIndex != 1)
{
return runActuatorStaticDataKeyList;
}
if (runActuatorStaticDataParameterList.ContainsKey(key) && ignoreListIndex != 2)
{
return runActuatorStaticDataParameterList;
}
if (runActuatorStaticDataSouceList.ContainsKey(key) && ignoreListIndex != 3)
{
return runActuatorStaticDataSouceList;
}
return null;
}
/// <summary>
/// Is the StaticDataCollection has th same key name
/// </summary>
/// <param name="yourKey">your Key</param>
/// <returns>is has </returns>
public bool IsHaveSameKey(string yourKey)
{
return (IsHasSameKey(yourKey, 0) != null);
}
/// <summary>
/// Add Data into runActuatorStaticDataKeyList (if DataParameter or DataSouce has same key retrun false , if DataKey has same key cover the vaule)
/// </summary>
/// <param name="key">key</param>
/// <param name="vaule">vaule</param>
/// <returns>is success</returns>
[MethodImplAttribute(MethodImplOptions.Synchronized)]
public bool AddStaticDataKey(string key, IRunTimeStaticData vaule)
{
//if (!(vaule is MyStaticDataValue))
//{
// return false;
//}
if (IsHasSameKey(key, IsAllCollectionKeyUnique?0:1) != null)
{
if (!RemoveStaticData(key, false))
{
return false;
}
}
runActuatorStaticDataKeyList.MyAdd(key, vaule);
OnListChanged(true);
return true;
}
/// <summary>
/// Add Data into runActuatorStaticDataParameterList (if DataKey or DataSouce has same key retrun false , if DataParameter has same key cover the vaule)
/// </summary>
/// <param name="key">key</param>
/// <param name="vaule">vaule</param>
/// <returns>is success</returns>
[MethodImplAttribute(MethodImplOptions.Synchronized)]
public bool AddStaticDataParameter(string key, IRunTimeStaticData vaule)
{
if (IsHasSameKey(key, IsAllCollectionKeyUnique ? 0 : 2) != null)
{
if (!RemoveStaticData(key, false))
{
return false;
}
}
runActuatorStaticDataParameterList.MyAdd<IRunTimeStaticData>(key, vaule);
OnListChanged(true);
return true;
}
/// <summary>
/// Add Data into runActuatorStaticDataSouceList (if DataKey or DataParameter has same key retrun false , if DataSouce has same key cover the vaule)
/// </summary>
/// <param name="key">key</param>
/// <param name="vaule">vaule</param>
/// <returns>is success</returns>
[MethodImplAttribute(MethodImplOptions.Synchronized)]
public bool AddStaticDataSouce(string key, IRunTimeDataSource vaule)
{
if (IsHasSameKey(key, IsAllCollectionKeyUnique ? 0 : 3) != null)
{
if (!RemoveStaticData(key, false))
{
return false;
}
}
runActuatorStaticDataSouceList.MyAdd<IRunTimeDataSource>(key, vaule);
OnListChanged(true);
return true;
}
/// <summary>
/// Add Data by CaseStaticDataType with vaule
/// </summary>
/// <param name="key">key</param>
/// <param name="vaule">vaule</param>
/// <returns></returns>
[MethodImplAttribute(MethodImplOptions.Synchronized)]
public bool AddStaticData(string key, IRunTimeStaticData vaule)
{
switch(vaule.RunTimeStaticDataType)
{
case CaseStaticDataType.caseStaticData_vaule:
return AddStaticDataKey(key, vaule);
case CaseStaticDataType.caseStaticData_index:
case CaseStaticDataType.caseStaticData_long:
case CaseStaticDataType.caseStaticData_random:
case CaseStaticDataType.caseStaticData_time:
case CaseStaticDataType.caseStaticData_list:
case CaseStaticDataType.caseStaticData_strIndex:
return AddStaticDataParameter(key, vaule);
case CaseStaticDataType.caseStaticData_csv:
case CaseStaticDataType.caseStaticData_mysql:
case CaseStaticDataType.caseStaticData_redis:
IRunTimeDataSource tempDataSource = vaule as IRunTimeDataSource;
if (tempDataSource == null) return false;
return AddStaticDataSouce(key, tempDataSource);
default:
throw new NotSupportedException("nukonw CaseStaticDataType");
}
}
/// <summary>
/// Remove Static Data in any list (if there not has any same key retrun false)
/// </summary>
/// <param name="key">key or Regex</param>
/// <param name="isRegex">is use Regex</param>
/// <returns>is success</returns>
[MethodImplAttribute(MethodImplOptions.Synchronized)]
public bool RemoveStaticData(string key, bool isRegex)
{
if (!isRegex)
{
var tempDataList = IsHasSameKey(key, 0);
if (tempDataList == null)
{
return false;
}
else if (tempDataList == runActuatorStaticDataKeyList)
{
runActuatorStaticDataKeyList.Remove(key);
}
else if (tempDataList == runActuatorStaticDataParameterList)
{
runActuatorStaticDataParameterList.Remove(key);
}
else if (tempDataList == runActuatorStaticDataSouceList)
{
runActuatorStaticDataSouceList.Remove(key);
}
else
{
//ErrorLog.PutInLog(string.Format("error to [RemoveStaticData] in ActuatorStaticDataCollection the key is {0} ", key));
return false;
}
}
else
{
try
{
bool isFindAndRegexKey = false;
System.Text.RegularExpressions.Regex sr;
sr = new System.Text.RegularExpressions.Regex(key, System.Text.RegularExpressions.RegexOptions.None);
List<string> dataToDel = new List<string>();
foreach (var tempKey in runActuatorStaticDataKeyList.Keys)
{
if (sr.IsMatch(tempKey))
{
dataToDel.Add(tempKey);
}
}
foreach (string tempKey in dataToDel)
{
runActuatorStaticDataKeyList.Remove(tempKey);
}
if (dataToDel.Count > 0)
{
isFindAndRegexKey = true;
dataToDel.Clear();
}
foreach (var tempKey in runActuatorStaticDataParameterList.Keys)
{
if (sr.IsMatch(tempKey))
{
dataToDel.Add(tempKey);
}
}
foreach (string tempKey in dataToDel)
{
runActuatorStaticDataParameterList.Remove(tempKey);
}
if (dataToDel.Count > 0)
{
isFindAndRegexKey = true;
dataToDel.Clear();
}
foreach (var tempKey in runActuatorStaticDataSouceList.Keys)
{
if (sr.IsMatch(tempKey))
{
dataToDel.Add(tempKey);
}
}
foreach (string tempKey in dataToDel)
{
runActuatorStaticDataSouceList.Remove(tempKey);
}
if (dataToDel.Count > 0)
{
isFindAndRegexKey = true;
dataToDel.Clear();
}
if (!isFindAndRegexKey)
{
return false;
}
}
catch (Exception ex)
{
//ErrorLog.PutInLog(ex);
return false;
}
}
OnListChanged(true);
return true;
}
/// <summary>
/// set or change data in any list
/// </summary>
/// <param name="key">key</param>
/// <param name="configVaule">config Vaule</param>
/// <returns>is success</returns>
[MethodImplAttribute(MethodImplOptions.Synchronized)]
public bool SetStaticDataValue(string key, string configVaule)
{
var tempDataList = GetStaticData(key, 0);
if (tempDataList == null)
{
return false;
}
if (tempDataList.DataSet(configVaule))
{
OnListChanged(false);
return true;
}
return false;
}
public IRunTimeStaticData GetStaticData(string key ,int GetListIndex)
{
if (runActuatorStaticDataKeyList.ContainsKey(key) && (GetListIndex == 1 || GetListIndex == 0))
{
return runActuatorStaticDataKeyList[key];
}
if (runActuatorStaticDataParameterList.ContainsKey(key) && (GetListIndex == 1 || GetListIndex == 0))
{
return runActuatorStaticDataParameterList[key];
}
if (runActuatorStaticDataSouceList.ContainsKey(key) && (GetListIndex == 1 || GetListIndex == 0))
{
return runActuatorStaticDataSouceList[key];
}
return null;
}
public IRunTimeStaticData this[string key]
{
get
{
return GetStaticData(key, 0);
}
set
{
var tempDataList = IsHasSameKey(key, 0);
if (tempDataList == null)
{
throw new Exception("ActuatorStaticDataCollection do not have this key");
}
else if (tempDataList == runActuatorStaticDataKeyList )
{
if (value is MyStaticDataValue)
{
runActuatorStaticDataKeyList[key] = value;
}
else
{
throw new Exception("this StaticData must be a MyStaticDataValue");
}
}
else if (tempDataList == runActuatorStaticDataParameterList)
{
runActuatorStaticDataParameterList[key] = value;
}
else if (tempDataList == runActuatorStaticDataSouceList )
{
if (value is IRunTimeDataSource)
{
runActuatorStaticDataSouceList[key] = (IRunTimeDataSource)value;
}
else
{
throw new Exception("this StaticData must be a IRunTimeDataSource");
}
}
else
{
throw new Exception("nuknow DataSource");
}
OnListChanged(false);
}
}
public IEnumerator GetEnumerator()
{
return new ActuatorStaticDataEnum(this);
}
public object Clone()
{
return new ActuatorStaticDataCollection(runActuatorStaticDataKeyList.MyDeepClone(), runActuatorStaticDataParameterList.MyDeepClone(), runActuatorStaticDataSouceList.MyDeepClone());
}
public void Dispose()
{
runActuatorStaticDataKeyList.Clear();
runActuatorStaticDataParameterList.Clear();
runActuatorStaticDataSouceList.Clear();
}
public class ActuatorStaticDataEnum : IEnumerator
{
private Dictionary<string, IRunTimeStaticData> _staticDataKeyList;
private Dictionary<string, IRunTimeStaticData> _staticDataParameterList;
private Dictionary<string, IRunTimeDataSource> _staticDataSouceList;
private int _index;
private readonly int _version;
private KeyValuePair<string, IRunTimeStaticData> _current;
private IEnumerator innerEnumerator = null;
internal ActuatorStaticDataEnum(ActuatorStaticDataCollection actuatorStaticDataCollection)
{
_staticDataKeyList = actuatorStaticDataCollection.runActuatorStaticDataKeyList;
_staticDataParameterList = actuatorStaticDataCollection.runActuatorStaticDataParameterList;
_staticDataSouceList = actuatorStaticDataCollection.runActuatorStaticDataSouceList;
_index = 0;
_version = actuatorStaticDataCollection._version;
_current = default;
}
object IEnumerator.Current
{
get
{
return Current;
}
}
public KeyValuePair<string, IRunTimeStaticData> Current => _current;
public bool MoveNext()
{
//if (_version != _actuatorStaticDataCollection._version)
//{
// ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion();
//}
if (_index == 0)
{
innerEnumerator = _staticDataKeyList.GetEnumerator();
_index = -1;
}
else if (_index == 1)
{
innerEnumerator = _staticDataParameterList.GetEnumerator();
_index = -2;
}
else if (_index == 2)
{
innerEnumerator = _staticDataSouceList.GetEnumerator();
_index = -3;
}
else if(_index == 3) // end
{
_current = default;
return false;
}
if (_index < -2 && _index > 2)
{
throw new Exception("unkonw StaticData in [MoveNext]");
}
if (innerEnumerator.MoveNext())
{
if(_index == -3)
{
KeyValuePair<string, IRunTimeDataSource> tempDataSourceKvp = (KeyValuePair<string, IRunTimeDataSource>)innerEnumerator.Current;
_current = new KeyValuePair<string, IRunTimeStaticData>(tempDataSourceKvp.Key, tempDataSourceKvp.Value);
}
else
{
_current = (KeyValuePair<string, IRunTimeStaticData>)innerEnumerator.Current;
}
return true;
}
else
{
_index = Math.Abs(_index);
return MoveNext();
}
}
public void Reset()
{
_index = 0;
_current = default;
}
}
}
}
================================================
FILE: AutoTest/RunTimeStaticData/CaseRunTimeDataTypeEngine.cs
================================================
#define ALLOW_CSV_EMPTY
using FreeHttp.AutoTest.RunTimeStaticData.MyStaticData;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData
{
/// <summary>
/// 如果您想要添加新类型的【RunTimeStaticData】请在此处添加解释器,并为它添加相应的继承于【IRunTimeStaticData】存储的结构
/// 然后在CaseStaticDataType枚举中直接新增自己的类型(请与原有格式保持一致),最后您还需要在执行器【LoadScriptRunTime】函数中添加自己的分支
/// </summary>
public class CaseRunTimeDataTypeEngine
{
#region TypeDictionary
public static Dictionary<CaseStaticDataType, List<string>> dictionaryStaticDataAnnotation = new Dictionary<CaseStaticDataType, List<string>>()
{
{CaseStaticDataType.caseStaticData_vaule,new List<string>(){"Key-Value","value","value","this value the meaning is the key","provide a key value list like dictionary"}},
{CaseStaticDataType.caseStaticData_index,new List<string>(){"Index","start-end-step","1-1000-2","start: the start of the number \nend: the end of the number (the max is 2147483647)\nstep: when get next value the number will add step (default is 1)","provide a number index ,you can get a increase index each time"}},
{CaseStaticDataType.caseStaticData_long,new List<string>(){"LongIndex","start-end-step","1-1000-2","start: the start of the number \nend: the end of the number (the max is 9223372036854775807)\nstep: when get next value the number will add step (default is 1)","provide a number long index ,you can get a increase index each time"}},
{CaseStaticDataType.caseStaticData_strIndex,new List<string>(){"StringIndex","start-end-step","0001-1000-2","start: the start of the number string (the lengh should equal to the end lengh)\nend: the end of the number sting (the max is 9223372036854775807)\nstep: when get next value the number will add step (default is 1)","provide a number string index ,you can keep the same lengh of the string each time"}},
{CaseStaticDataType.caseStaticData_time,new List<string>(){"Time","DateTimeFormatInfo","yyyy-MM-ddTHH:mm:ss","DateTimeFormatInfo: the format for data time (find DateTimeFormatInfo in dotnet doc) \n[another expression] a int number mean timestamp ,10000 is microsecond timestamp;10000000 is second timestamp ","provide a data time string with your format"}},
{CaseStaticDataType.caseStaticData_random,new List<string>(){"Random","len-type","10-1","len: the lengh of the random string\ntype: the type of random mode (0 is all the visible asc2 ; 1 is only number ; 2 is letter in upper ; 3 is letter in lower ; 4 is the special character ; 5 is all the letters ; 6 is all the letters or numbers)(default is 1)","provide a random strng with your mode"}},
{CaseStaticDataType.caseStaticData_list,new List<string>(){"List","v1,v2,v3,v4-mode","ab,c,de-1","v1,v2,v3: the value of the list (the value list segmentation by ,) \nmode: the mode read 1 is read by order ; 2 is read by random (default is 1)","provide a list value ,you can get it by order or random"}},
{CaseStaticDataType.caseStaticData_csv,new List<string>(){"CSV","path-encode","csvdatasouce.csv-65001","path: the file path (start with @ means absolute path) \nencode: the encode of the file (default is 65001) \n[another expression] start with'*' and followed by ColumnCount-RowCount (like *10-10 mean creat a 10*10 empty csv data source)","provide a data souce form csv file ,you can get it by order or location"}}
};
/// <summary>
/// 参数化数据类型映射表
/// </summary>
public static Dictionary<CaseStaticDataType, CaseStaticDataClass> dictionaryStaticDataTypeClass = new Dictionary<CaseStaticDataType, CaseStaticDataClass>() {
{ CaseStaticDataType.caseStaticData_vaule, CaseStaticDataClass.caseStaticDataKey },
{ CaseStaticDataType.caseStaticData_index, CaseStaticDataClass.caseStaticDataParameter },
{ CaseStaticDataType.caseStaticData_long, CaseStaticDataClass.caseStaticDataParameter},
{ CaseStaticDataType.caseStaticData_list, CaseStaticDataClass.caseStaticDataParameter},
{ CaseStaticDataType.caseStaticData_time, CaseStaticDataClass.caseStaticDataParameter},
{ CaseStaticDataType.caseStaticData_random, CaseStaticDataClass.caseStaticDataParameter},
{ CaseStaticDataType.caseStaticData_csv, CaseStaticDataClass.caseStaticDataSource},
{ CaseStaticDataType.caseStaticData_mysql, CaseStaticDataClass.caseStaticDataSource},
{ CaseStaticDataType.caseStaticData_redis, CaseStaticDataClass.caseStaticDataSource},
{CaseStaticDataType.caseStaticData_strIndex, CaseStaticDataClass.caseStaticDataParameter}};
public static Dictionary<CaseStaticDataClass, List<CaseStaticDataType>> dictionaryStaticDataTypeSource = new Dictionary<CaseStaticDataClass, List<CaseStaticDataType>>()
{
{CaseStaticDataClass.caseStaticDataKey,new List<CaseStaticDataType>(){CaseStaticDataType.caseStaticData_vaule}},
{CaseStaticDataClass.caseStaticDataParameter,new List<CaseStaticDataType>(){CaseStaticDataType.caseStaticData_index,CaseStaticDataType.caseStaticData_list,CaseStaticDataType.caseStaticData_long,CaseStaticDataType.caseStaticData_random,CaseStaticDataType.caseStaticData_strIndex,CaseStaticDataType.caseStaticData_time}},
{CaseStaticDataClass.caseStaticDataSource,new List<CaseStaticDataType>(){CaseStaticDataType.caseStaticData_csv}}
};
//参数化数据处理函数委托
public delegate bool GetStaticDataAction<T>(out T yourStaticData, out string errorMes, string yourFormatData) where T : IRunTimeStaticData;
/// <summary>
/// CaseStaticDataType数据与处理函数映射表
/// </summary>
public static Dictionary<CaseStaticDataType, GetStaticDataAction<IRunTimeStaticData>> dictionaryStaticDataParameterAction = new Dictionary<CaseStaticDataType, GetStaticDataAction<IRunTimeStaticData>>() {
{ CaseStaticDataType.caseStaticData_index, new GetStaticDataAction<IRunTimeStaticData>(CaseRunTimeDataTypeEngine.GetIndexStaticData) } ,
{ CaseStaticDataType.caseStaticData_strIndex, new GetStaticDataAction<IRunTimeStaticData>(CaseRunTimeDataTypeEngine.GetStrIndexStaticData) } ,
{ CaseStaticDataType.caseStaticData_long, new GetStaticDataAction<IRunTimeStaticData>(CaseRunTimeDataTypeEngine.GetLongStaticData) } ,
{ CaseStaticDataType.caseStaticData_list, new GetStaticDataAction<IRunTimeStaticData>(CaseRunTimeDataTypeEngine.GetListStaticData) } ,
{ CaseStaticDataType.caseStaticData_time, new GetStaticDataAction<IRunTimeStaticData>(CaseRunTimeDataTypeEngine.GetTimeStaticData) } ,
{ CaseStaticDataType.caseStaticData_random, new GetStaticDataAction<IRunTimeStaticData>(CaseRunTimeDataTypeEngine.GetRandomStaticData) }
};
/// <summary>
/// CaseStaticDataType数据与处理函数映射表
/// </summary>
public static Dictionary<CaseStaticDataType, GetStaticDataAction<IRunTimeDataSource>> dictionaryStaticDataSourceAction = new Dictionary<CaseStaticDataType, GetStaticDataAction<IRunTimeDataSource>>() {
{ CaseStaticDataType.caseStaticData_csv, new GetStaticDataAction<IRunTimeDataSource>(CaseRunTimeDataTypeEngine.GetCsvStaticDataSource) }
};
#endregion
#region IRunTimeStaticData
public static bool GetIndexStaticData(out IRunTimeStaticData yourStaticData, out string errorMes, string yourFormatData)
{
try
{
string[] tempStartEnd;
tempStartEnd = yourFormatData.Split('-');
if (tempStartEnd.Length == 2)
{
yourStaticData = new MyStaticDataIndex(int.Parse(tempStartEnd[0]), int.Parse(tempStartEnd[1]), 1, yourFormatData);
errorMes = null;
return true;
}
if (tempStartEnd.Length == 3)
{
yourStaticData = new MyStaticDataIndex(int.Parse(tempStartEnd[0]), int.Parse(tempStartEnd[1]), int.Parse(tempStartEnd[2]), yourFormatData);
errorMes = null;
return true;
}
else
{
yourStaticData = new MyStaticDataIndex(0, 2147483647, 1, yourFormatData);
errorMes = "find error data[myStaticDataIndex] in RunTimeStaticData - ScriptRunTime :(find error number of parameters)";
}
}
catch (Exception)
{
yourStaticData = new MyStaticDataIndex(0, 2147483647, 1, yourFormatData);
errorMes = "find error data[myStaticDataIndex] in RunTimeStaticData - ScriptRunTime ";
}
return false;
}
public static bool GetStrIndexStaticData(out IRunTimeStaticData yourStaticData, out string errorMes, string yourFormatData)
{
try
{
string[] tempStartEnd;
tempStartEnd = yourFormatData.Split('-');
if (tempStartEnd.Length == 2)
{
if (tempStartEnd[0].Length == tempStartEnd[0].Length)
{
yourStaticData = new MyStaticDataStrIndex(long.Parse(tempStartEnd[0]), long.Parse(tempStartEnd[1]), 1, tempStartEnd[0].Length, yourFormatData);
errorMes = null;
return true;
}
else
{
yourStaticData = new MyStaticDataStrIndex(0, 9223372036854775807, 1, 19, yourFormatData);
errorMes = "find error data[myStaticDataStrIndex] with error len in RunTimeStaticData - ScriptRunTime ";
}
}
else if (tempStartEnd.Length == 3)
{
if (tempStartEnd[0].Length == tempStartEnd[0].Length)
{
yourStaticData = new MyStaticDataStrIndex(long.Parse(tempStartEnd[0]), long.Parse(tempStartEnd[1]), long.Parse(tempStartEnd[2]), tempStartEnd[0].Length, yourFormatData);
errorMes = null;
return true;
}
else
{
yourStaticData = new MyStaticDataStrIndex(0, 9223372036854775807, 1, 19, yourFormatData);
errorMes = "find error data[myStaticDataStrIndex] with error len in RunTimeStaticData - ScriptRunTime ";
}
}
else
{
yourStaticData = new MyStaticDataStrIndex(0, 9223372036854775807, 1, 19, yourFormatData);
errorMes = "find error data[myStaticDataLong] in RunTimeStaticData - ScriptRunTime :(find error number of parameters)";
}
}
catch (Exception)
{
yourStaticData = new MyStaticDataStrIndex(0, 9223372036854775807, 1, 19, yourFormatData);
errorMes = "find error data[myStaticDataLong] in RunTimeStaticData - ScriptRunTime ";
}
return false;
}
public static bool GetLongStaticData(out IRunTimeStaticData yourStaticData, out string errorMes, string yourFormatData)
{
try
{
string[] tempStartEnd;
tempStartEnd = yourFormatData.Split('-');
if (tempStartEnd.Length == 2)
{
yourStaticData = new MyStaticDataLong(long.Parse(tempStartEnd[0]), long.Parse(tempStartEnd[1]), 1, yourFormatData);
errorMes = null;
return true;
}
else if (tempStartEnd.Length == 3)
{
yourStaticData = new MyStaticDataLong(long.Parse(tempStartEnd[0]), long.Parse(tempStartEnd[1]), long.Parse(tempStartEnd[2]), yourFormatData);
errorMes = null;
return true;
}
else
{
yourStaticData = new MyStaticDataLong(0, 9223372036854775807, 1, yourFormatData);
errorMes = "find error data[myStaticDataLong] in RunTimeStaticData - ScriptRunTime :(find error number of parameters)";
}
}
catch (Exception)
{
yourStaticData = new MyStaticDataLong(0, 9223372036854775807, 1, yourFormatData);
errorMes = "find error data[myStaticDataLong] in RunTimeStaticData - ScriptRunTime ";
}
return false;
}
public static bool GetTimeStaticData(out IRunTimeStaticData yourStaticData, out string errorMes, string yourFormatData)
{
errorMes = null;
try
{
System.DateTime.Now.ToString(yourFormatData);
}
catch
{
errorMes = "find error data[myStaticDataNowTime] in RunTimeStaticData - ScriptRunTime ";
yourStaticData = new MyStaticDataNowTime("", yourFormatData);
return false;
}
yourStaticData = new MyStaticDataNowTime(yourFormatData, yourFormatData);
return true;
}
public static bool GetRandomStaticData(out IRunTimeStaticData yourStaticData, out string errorMes, string yourFormatData)
{
try
{
string[] tempStartEnd;
tempStartEnd = yourFormatData.Split('-');
if (tempStartEnd.Length < 2)
{
yourStaticData = new MyStaticDataRandomStr(10, 0, yourFormatData);
errorMes = "find error data[myStaticDataRandomNumber] in RunTimeStaticData - ScriptRunTime ";
}
else
{
yourStaticData = new MyStaticDataRandomStr(int.Parse(tempStartEnd[0]), int.Parse(tempStartEnd[1]), yourFormatData);
errorMes = null;
return true;
}
}
catch (Exception)
{
yourStaticData = new MyStaticDataRandomStr(10, 0, yourFormatData);
errorMes = "find error data[myStaticDataRandomNumber] in RunTimeStaticData - ScriptRunTime ";
}
return false;
}
public static bool GetListStaticData(out IRunTimeStaticData yourStaticData, out string errorMes, string yourFormatData)
{
try
{
if (yourFormatData.EndsWith("-1"))
{
yourFormatData = yourFormatData.Remove(yourFormatData.Length - 2);
yourStaticData = new MyStaticDataList(yourFormatData, false, yourFormatData);
}
else if (yourFormatData.EndsWith("-2"))
{
yourFormatData = yourFormatData.Remove(yourFormatData.Length - 2);
yourStaticData = new MyStaticDataList(yourFormatData, true, yourFormatData);
}
else
{
yourStaticData = new MyStaticDataList(yourFormatData, false, yourFormatData);
}
errorMes = null;
return true;
}
catch (Exception)
{
yourStaticData = new MyStaticDataList("", false, yourFormatData);
errorMes = "find error data[myStaticDataList] in RunTimeStaticData - ScriptRunTime ";
}
return false;
}
#endregion
#region IRunTimeDataSource
public static bool GetCsvStaticDataSource(out IRunTimeDataSource yourStaticData, out string errorMes, string yourFormatData)
{
errorMes = null;
yourStaticData = null;
string csvPath = null;
int CodePage = 65001;
Encoding csvEncoding = null;
#if ALLOW_CSV_EMPTY
if (yourFormatData.StartsWith("*"))
{
int[] tempConuts;
if (!yourFormatData.Remove(0, 1).MySplitToIntArray('-', out tempConuts) || tempConuts.Length!=2)
{
errorMes = string.Format("[GetCsvStaticDataSource]error in [MySplitToIntArray] with :[{0}]", yourFormatData);
return false;
}
if(tempConuts[0]<1||tempConuts[1]<1)
{
errorMes = string.Format("[GetCsvStaticDataSource]error in [MySplitToIntArray] with :[{0}] \nYour row conut and columu conut should greater than 0 ", yourFormatData);
return false;
}
List<string> tempRow = new List<string>(tempConuts[0]);
for (int i = 0; i < tempConuts[0]; i++)
{
tempRow.Add(null);
}
List<List<string>> tempCsvDataSource = new List<List<string>>(tempConuts[1]);
for (int i = 0; i < tempConuts[1];i++ )
{
tempCsvDataSource.Add(tempRow.ToList());
}
yourStaticData = new MyStaticDataSourceCsv(tempCsvDataSource, yourFormatData);
return true;
}
#endif
if (yourFormatData.Contains('-'))
{
if (!yourFormatData.MySplitIntEnd('-', out csvPath, out CodePage))
{
errorMes = string.Format("[GetCsvStaticDataSource]error in [MySplitIntEnd] with :[{0}]", yourFormatData);
return false;
}
}
else
{
csvPath = yourFormatData;
}
try
{
csvEncoding = System.Text.Encoding.GetEncoding(CodePage);
}
catch
{
errorMes = string.Format("[GetCsvStaticDataSource]error in 【CodePage】 [{0}]", yourFormatData);
return false;
}
csvPath = csvPath.StartsWith("@") ? csvPath.Remove(0, 1) : string.Format("{0}\\FreeHttp\\{1}", MyCommonTool.rootPath, csvPath);
if (!System.IO.File.Exists(csvPath))
{
errorMes = string.Format("[GetCsvStaticDataSource]error in csv path [path not exixts] [{0}]", yourFormatData);
return false;
}
MyCommonHelper.FileHelper.CsvFileHelper myCsv = new MyCommonHelper.FileHelper.CsvFileHelper(csvPath, csvEncoding);
try
{
yourStaticData = new MyStaticDataSourceCsv(myCsv.GetListCsvData(), yourFormatData);
}
catch (Exception ex)
{
errorMes = ex.Message;
return false;
}
finally
{
myCsv.Dispose();
}
return true;
}
#endregion
}
}
================================================
FILE: AutoTest/RunTimeStaticData/CaseStaticDataType.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData
{
public enum CaseStaticDataType
{
caseStaticData_vaule = 10000,
caseStaticData_index = 20000,
caseStaticData_long = 20001,
caseStaticData_random = 20002,
caseStaticData_time = 20003,
caseStaticData_list = 20004,
caseStaticData_strIndex = 20005,
caseStaticData_csv = 30000,
caseStaticData_mysql = 30001,
caseStaticData_redis = 30002,
}
/// <summary>
/// 静态参数化数据大分类
/// </summary>
public enum CaseStaticDataClass
{
caseStaticDataKey = 0,
caseStaticDataParameter = 1,
caseStaticDataSource = 2
}
}
================================================
FILE: AutoTest/RunTimeStaticData/IRunTimeDataSource.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData
{
public interface IRunTimeDataSource : IRunTimeStaticData
{
/// <summary>
/// 获取一个值指示该数据源是否已经连接
/// </summary>
bool IsConnected { get; }
/// <summary>
/// 连接数据源
/// </summary>
/// <returns></returns>
bool ConnectDataSource();
/// <summary>
/// 断开数据源连接
/// </summary>
/// <returns></returns>
bool DisConnectDataSource();
/// <summary>
/// 以指定地址返回数据源中的数据(地址无效或错误请返回null)
/// </summary>
/// <param name="vauleAddress">地址字符串(需要按格式指定并定义)</param>
/// <returns>目标数据</returns>
string GetDataVaule(string vauleAddress);
/// <summary>
/// 设置指定地址的数据值 (IRunTimeStaticData 中的DataSet 设置的是当前值)
/// </summary>
/// <param name="vauleAddress">地址字符串(需要按格式指定并定义)</param>
/// <param name="expectData">期望值</param>
/// <returns>是否成功设置</returns>
bool DataSet(string vauleAddress, string expectData);
}
}
================================================
FILE: AutoTest/RunTimeStaticData/IRunTimeStaticData.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData
{
/// <summary>
/// StaticData数据结构接口
/// Current 属性指向集合中的当前成员。
/// MoveNext 属性将枚举数移到集合中的下一成员
/// Reset 属性将枚举数移回集合的开始处
/// </summary>
//[ServiceKnownType(typeof(System.DBNull))]
public interface IRunTimeStaticData : ICloneable
{
/// <summary>
///原始连接字符串
/// </summary>
string OriginalConnectString
{
get;
}
/// <summary>
/// 获取当前初始化数据类型别名
/// </summary>
string RunTimeStaticDataTypeAlias
{
get;
}
/// <summary>
/// 获取当前初始化数据类型
/// </summary>
CaseStaticDataType RunTimeStaticDataType
{
get;
}
/// <summary>
/// 获取当前游标地址的值
/// </summary>
/// <returns></returns>
string DataCurrent();
/// <summary>
/// 将游标下移,并返回下移之后的值(如何已经到达上边界,则重置游标)(为方便使用请特殊处理初始游标也包括重置后的DataMoveNext与DataCurrent一致,即此时DataMoveNext不向下移动)
/// </summary>
/// <returns></returns>
string DataMoveNext();
/// <summary>
/// 重置游标
/// </summary>
void DataReset();
/// <summary>
/// 设置当前游标指示的数据的值
/// </summary>
/// <param name="expectData">期望值</param>
/// <returns>设置是否成功</returns>
bool DataSet(string expectData);
}
}
================================================
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataIndex.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData.MyStaticData
{
/// <summary>
/// 为StaticData提供类似索引递增的动态数据【IRunTimeStaticData】
/// </summary>
[DataContract]
public class MyStaticDataIndex : IRunTimeStaticData
{
[DataMember]
private bool isNew;
[DataMember]
private int dataIndex;
[DataMember]
private int defaultStart;
[DataMember]
private int defaultEnd;
[DataMember]
private int defaultStep;
[DataMember]
public string OriginalConnectString { get; private set; }
public string RunTimeStaticDataTypeAlias
{
get { return "staticData_index"; }
}
public CaseStaticDataType RunTimeStaticDataType
{
get { return CaseStaticDataType.caseStaticData_index; }
}
public MyStaticDataIndex(int yourStart, int yourEnd, int yourStep)
{
isNew = true;
dataIndex = defaultStart = yourStart;
defaultEnd = yourEnd;
defaultStep = yourStep;
}
public MyStaticDataIndex(int yourStart, int yourEnd, int yourStep, string originalConnectString)
: this(yourStart, yourEnd, yourStep)
{
OriginalConnectString = originalConnectString;
}
public object Clone()
{
return new MyStaticDataIndex(defaultStart, defaultEnd, defaultStep);
}
public string DataCurrent()
{
return dataIndex.ToString();
}
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.Synchronized)]
public string DataMoveNext()
{
if (isNew)
{
isNew = false;
return dataIndex.ToString();
}
if (dataIndex >= defaultEnd)
{
DataReset();
return DataMoveNext();
}
else
{
dataIndex += defaultStep;
}
return dataIndex.ToString();
}
public void DataReset()
{
isNew = true;
dataIndex = defaultStart;
}
public bool DataSet(string expectData)
{
int tempData;
if (int.TryParse(expectData, out tempData))
{
if (tempData >= defaultStart && tempData <= defaultEnd)
{
dataIndex = tempData;
return true;
}
}
return false;
}
}
}
================================================
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataList.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData.MyStaticData
{
/// <summary>
/// 为StaticData提供当基于List的列表数据支持据【IRunTimeStaticData】
/// </summary>
[DataContract]
public class MyStaticDataList : IRunTimeStaticData
{
[DataMember]
private bool isNew;
[DataMember]
private string souseData;
[DataMember]
private List<string> souseListData;
[DataMember]
private int nowIndex;
[DataMember]
private bool isRandom;
private Random ran;
[DataMember]
public string OriginalConnectString { get;private set; }
public string RunTimeStaticDataTypeAlias
{
get { return "staticData_list"; }
}
public CaseStaticDataType RunTimeStaticDataType
{
get { return CaseStaticDataType.caseStaticData_list; }
}
public MyStaticDataList(string yourSourceData, bool isRandomNext)
{
isNew = true;
souseData = yourSourceData;
souseListData = yourSourceData.Split(',').ToList();
nowIndex = 0;
isRandom = isRandomNext;
if (isRandom)
{
ran = new Random();
}
else
{
ran = null;
}
}
public MyStaticDataList(string yourSourceData, bool isRandomNext, string originalConnectString)
: this(yourSourceData, isRandomNext)
{
OriginalConnectString = originalConnectString;
}
public object Clone()
{
return new MyStaticDataList(souseData, isRandom);
}
public string DataCurrent()
{
return souseListData[nowIndex];
}
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.Synchronized)]
public string DataMoveNext()
{
if (isRandom)
{
nowIndex = ran.Next(0, souseListData.Count - 1);
return souseListData[nowIndex];
}
else
{
if (isNew)
{
isNew = false;
}
else
{
nowIndex++;
if (nowIndex > (souseListData.Count - 1))
{
nowIndex = 0;
}
}
return souseListData[nowIndex];
}
}
public void DataReset()
{
isNew = true;
nowIndex = 0;
}
public bool DataSet(string expectData)
{
if (souseListData.Contains(expectData))
{
nowIndex = souseListData.IndexOf(expectData);
}
return false;
}
}
}
================================================
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataLong.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData.MyStaticData
{
/// <summary>
/// 为StaticData提供长数字索引支持【IRunTimeStaticData】
/// </summary>
[DataContract]
public class MyStaticDataLong : IRunTimeStaticData
{
[DataMember]
private bool isNew;
[DataMember]
private long dataIndex;
[DataMember]
private long defaultStart;
[DataMember]
private long defaultEnd;
[DataMember]
private long defaultStep;
[DataMember]
public string OriginalConnectString { get; private set; }
public string RunTimeStaticDataTypeAlias
{
get { return "staticData_long"; }
}
public CaseStaticDataType RunTimeStaticDataType
{
get { return CaseStaticDataType.caseStaticData_long; }
}
public MyStaticDataLong(long yourStart, long yourEnd, long yourStep)
{
isNew = true;
dataIndex = defaultStart = yourStart;
defaultEnd = yourEnd;
defaultStep = yourStep;
}
public MyStaticDataLong(long yourStart, long yourEnd, long yourStep, string originalConnectString)
: this(yourStart, yourEnd, yourStep)
{
OriginalConnectString = originalConnectString;
}
public object Clone()
{
return new MyStaticDataLong(defaultStart, defaultEnd, defaultStep);
}
public string DataCurrent()
{
return dataIndex.ToString();
}
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.Synchronized)]
public string DataMoveNext()
{
if (isNew)
{
isNew = false;
return dataIndex.ToString();
}
if (dataIndex >= defaultEnd)
{
DataReset();
return DataMoveNext();
}
else
{
//lock(this)
//{
dataIndex += defaultStep;
//}
}
return dataIndex.ToString();
}
public void DataReset()
{
isNew = true;
dataIndex = defaultStart;
}
public bool DataSet(string expectData)
{
long tempData;
if (long.TryParse(expectData, out tempData))
{
if (tempData >= defaultStart && tempData <= defaultEnd)
{
dataIndex = tempData;
return true;
}
}
return false;
}
}
}
================================================
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataNowTime.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData.MyStaticData
{
/// <summary>
/// 为StaticData提供当前时间的动态数据【IRunTimeStaticData】
/// </summary>
[DataContract]
public class MyStaticDataNowTime : IRunTimeStaticData
{
[DataMember]
string myNowStr;
[DataMember]
string myDataFormatInfo;
[DataMember]
int timestampFormatdividend;
[DataMember]
public string OriginalConnectString { get; private set; }
public string RunTimeStaticDataTypeAlias
{
get { return "staticData_time"; }
}
public CaseStaticDataType RunTimeStaticDataType
{
get { return CaseStaticDataType.caseStaticData_time; }
}
public MyStaticDataNowTime(string yourRormatInfo)
{
myNowStr = "";
if (int.TryParse(yourRormatInfo, out timestampFormatdividend))
{
if(timestampFormatdividend<=0)
{
timestampFormatdividend = 0;
myDataFormatInfo = "";
}
}
else
{
myDataFormatInfo = yourRormatInfo;
}
}
public MyStaticDataNowTime(string yourRormatInfo, string originalConnectString)
: this(yourRormatInfo)
{
OriginalConnectString = originalConnectString;
}
public object Clone()
{
return new MyStaticDataNowTime(myDataFormatInfo);
}
public string DataCurrent()
{
return myNowStr;
}
public string DataMoveNext()
{
if (timestampFormatdividend == 0)
{
myNowStr = System.DateTime.Now.ToString(myDataFormatInfo);
}
else
{
myNowStr = ((DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / timestampFormatdividend).ToString();
}
return myNowStr;
}
public void DataReset()
{
myNowStr = "";
}
public bool DataSet(string expectData)
{
if (expectData != null)
{
myNowStr = expectData;
return true;
}
return false;
}
}
}
================================================
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataRandomStr.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData.MyStaticData
{
/// <summary>
/// 为StaticData提供随机字符串动态数据【IRunTimeStaticData】
/// </summary>
[DataContract]
public class MyStaticDataRandomStr : IRunTimeStaticData
{
[DataMember]
string myNowStr;
[DataMember]
int myStrNum;
[DataMember]
int myStrType;
[DataMember]
public string OriginalConnectString { get; private set; }
public string RunTimeStaticDataTypeAlias
{
get { return "staticData_random"; }
}
public CaseStaticDataType RunTimeStaticDataType
{
get { return CaseStaticDataType.caseStaticData_random; }
}
public MyStaticDataRandomStr(int yourStrNum, int yourStrType)
{
myNowStr = "";
myStrNum = yourStrNum;
myStrType = yourStrType;
}
public MyStaticDataRandomStr(int yourStrNum, int yourStrType, string originalConnectString)
: this(yourStrNum, yourStrType)
{
OriginalConnectString = originalConnectString;
}
public object Clone()
{
return new MyStaticDataRandomStr(myStrNum, myStrType);
}
public string DataCurrent()
{
return myNowStr;
}
public string DataMoveNext()
{
myNowStr = MyCommonTool.GenerateRandomStr(myStrNum, myStrType);
return myNowStr;
}
public void DataReset()
{
myNowStr = "";
}
public bool DataSet(string expectData)
{
if (expectData != null)
{
myNowStr = expectData;
return true;
}
return false;
}
}
}
================================================
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataSourceCsv.cs
================================================
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData.MyStaticData
{
[DataContract]
public class MyStaticDataSourceCsv : IRunTimeDataSource
{
[DataMember]
private bool isNew;
[DataMember]
private int nowRowIndex;
[DataMember]
private int nowColumnIndex;
[DataMember]
private List<List<string>> csvData;
[DataMember]
public string OriginalConnectString { get; private set; }
public string RunTimeStaticDataTypeAlias
{
get { return "staticDataSource_csv"; }
}
public CaseStaticDataType RunTimeStaticDataType
{
get { return CaseStaticDataType.caseStaticData_csv; }
}
public MyStaticDataSourceCsv(List<List<string>> yourCsvData)
{
isNew = true;
nowRowIndex = 0;
nowColumnIndex = 0;
if(!SetDataSource(yourCsvData))
{
csvData = new List<List<string>>() { new List<string>() { "NullData" } };
}
}
public MyStaticDataSourceCsv(List<List<string>> yourCsvData, string originalConnectString)
: this(yourCsvData)
{
OriginalConnectString = originalConnectString;
}
public object Clone()
{
return new MyStaticDataSourceCsv(csvData);
}
public bool IsConnected
{
get { return true; }
}
public bool ConnectDataSource()
{
return true;
}
public bool DisConnectDataSource()
{
return true;
}
public List<List<string>> GetDataSource()
{
return csvData;
}
public bool SetDataSource(List<List<string>> yourDataSource)
{
if (yourDataSource.Count == 0 || yourDataSource[0] == null || yourDataSource[0].Count==0)
{
return false;
}
for (int i = yourDataSource.Count -1 ; i >= 0; i--)
{
if (yourDataSource[i] == null || yourDataSource[i].Count==0)
{
yourDataSource.RemoveAt(i);
}
}
csvData = yourDataSource;
if(nowRowIndex>=yourDataSource.Count || nowColumnIndex>=yourDataSource[nowRowIndex].Count)
{
DataReset();
}
return true;
}
public string GetDataVaule(string vauleAddress)
{
if (vauleAddress != null)
{
int[] csvPosition;
if (vauleAddress.MySplitToIntArray('-', out csvPosition))
{
if (csvPosition.Length == 2)
{
return GetDataVaule(csvPosition[1], csvPosition[0]);
}
}
}
return null;
}
public string GetDataVaule(int yourRowIndex, int yourColumnIndex)
{
if (yourRowIndex < csvData.Count)
{
if (yourColumnIndex < csvData[yourRowIndex].Count)
{
return csvData[yourRowIndex][yourColumnIndex] ?? "";
}
}
return null;
}
public string DataCurrent()
{
//不需要检查 Index ,索引在内部操作,不可能越界
return csvData[nowRowIndex][nowColumnIndex] ?? "";
}
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.Synchronized)]
public string DataMoveNext()
{
if (isNew)
{
isNew = false;
}
else
{
//内部游标没有变化前不会越界
if (nowColumnIndex + 1 < csvData[nowRowIndex].Count)
{
nowColumnIndex++;
}
else if (nowRowIndex + 1 < csvData.Count)
{
nowColumnIndex = 0;
nowRowIndex++;
}
else
{
DataReset();
}
}
return DataCurrent();
}
public void DataReset()
{
//对于csv文件解析出来的数据不可能出现空行空列的情况,所以(0,0)
nowRowIndex = 0;
nowColumnIndex = 0;
isNew = true;
}
/// <summary>
/// 设置源数据(使用|分割数据地址及数据值,如果以|开头则表示设置当前地址的值,不含有|的数据也表示当前值)
/// </summary>
/// <param name="ExpressionData">数据地址及数据内容字符串</param>
/// <returns>是否完成</returns>
public bool DataExpressionSet(string ExpressionData)
{
if (ExpressionData != null)
{
int splitIndex = ExpressionData.IndexOf('|');
if (splitIndex > 0)
{
return DataSet(ExpressionData.Substring(0, splitIndex), ExpressionData.Remove(0, splitIndex + 1));
}
else if(splitIndex ==0)
{
return DataSet(ExpressionData.Remove(0, 1));
}
else
{
return DataSet(ExpressionData);
}
}
return false;
}
public bool DataSet(string expectData)
{
if (expectData != null)
{
csvData[nowRowIndex][nowColumnIndex] = expectData;
return true;
}
return false;
}
public bool DataSet(int yourRowIndex, int yourColumnIndex, string expectData)
{
if (yourRowIndex < 0 || yourColumnIndex<0)
{
return false;
}
if (yourColumnIndex > csvData.Count - 1)
{
for (int i = 0; yourColumnIndex > csvData.Count - 1; i++)
{
csvData.Add(new List<string> { "" });
}
}
if (yourRowIndex > csvData[yourColumnIndex].Count - 1)
{
for (int i = 0; yourRowIndex > csvData[yourRowIndex].Count-1; i++)
{
csvData[yourRowIndex].Add("");
}
}
csvData[yourRowIndex][yourColumnIndex] = expectData;
return true;
}
public bool DataSet(string vauleAddress, string expectData)
{
if (vauleAddress != null)
{
int[] csvPosition;
if (vauleAddress.MySplitToIntArray('-', out csvPosition))
{
if (csvPosition.Length == 2)
{
DataSet(csvPosition[1], csvPosition[0], expectData);
return true;
}
}
}
return false;
}
public bool SetDataLocation(int yourRowIndex, int yourColumnIndex)
{
if (yourRowIndex < 0 || yourColumnIndex < 0)
{
return false;
}
if (yourRowIndex > csvData.Count - 1 || yourColumnIndex > csvData[yourRowIndex].Count - 1)
{
return false;
}
nowRowIndex = yourRowIndex;
nowColumnIndex = yourColumnIndex;
return true;
}
public Point GetDataLocation()
{
return new Point(nowColumnIndex, nowRowIndex);
}
}
}
================================================
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataStrIndex.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData.MyStaticData
{
/// <summary>
/// 为StaticData提定长字符串型数字索引支持【IRunTimeStaticData】
/// </summary>
[DataContract]
public class MyStaticDataStrIndex : IRunTimeStaticData
{
[DataMember]
private bool isNew;
[DataMember]
private long dataIndex;
[DataMember]
private long defaultStart;
[DataMember]
private long defaultEnd;
[DataMember]
private long defaultStep;
[DataMember]
private int strLen;
[DataMember]
public string OriginalConnectString { get; private set; }
public string RunTimeStaticDataTypeAlias
{
get { return "staticData_strIndex"; }
}
public CaseStaticDataType RunTimeStaticDataType
{
get { return CaseStaticDataType.caseStaticData_strIndex; }
}
public MyStaticDataStrIndex(long yourStart, long yourEnd, long yourStep, int yourStrLen)
{
isNew = true;
dataIndex = defaultStart = yourStart;
defaultEnd = yourEnd;
defaultStep = yourStep;
strLen = yourStrLen;
}
public MyStaticDataStrIndex(long yourStart, long yourEnd, long yourStep, int yourStrLen, string originalConnectString)
: this(yourStart, yourEnd, yourStep, yourStrLen)
{
OriginalConnectString = originalConnectString;
}
public object Clone()
{
return new MyStaticDataStrIndex(defaultStart, defaultEnd, defaultStep, strLen);
}
private string GetLenStr(long yourLeng)
{
string outStr = yourLeng.ToString();
int distinction = strLen - outStr.Length;
if (distinction > 0)
{
for (int i = 0; i < distinction; i++)
{
outStr = "0" + outStr;
}
}
return outStr;
}
public string DataCurrent()
{
return GetLenStr(dataIndex);
}
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.Synchronized)]
public string DataMoveNext()
{
if (isNew)
{
isNew = false;
return GetLenStr(dataIndex);
}
if (dataIndex >= defaultEnd)
{
DataReset();
return DataMoveNext();
}
else
{
dataIndex += defaultStep;
}
return GetLenStr(dataIndex);
}
public void DataReset()
{
isNew = true;
dataIndex = defaultStart;
}
public bool DataSet(string expectData)
{
long tempData;
if (long.TryParse(expectData, out tempData))
{
if (tempData >= defaultStart && tempData <= defaultEnd)
{
dataIndex = tempData;
return true;
}
}
return false;
}
}
}
================================================
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataValue.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;
namespace FreeHttp.AutoTest.RunTimeStaticData.MyStaticData
{
[DataContract]
public class MyStaticDataValue : IRunTimeStaticData
{
[DataMember]
private string defaultValue;
[DataMember]
public string OriginalConnectString { get;private set; }
public string RunTimeStaticDataTypeAlias
{
get { return "staticData_value"; }
}
public CaseStaticDataType RunTimeStaticDataType
{
get { return CaseStaticDataType.caseStaticData_vaule; }
}
public MyStaticDataValue(string yourVaule)
{
defaultValue=OriginalConnectString=yourVaule;
}
public object Clone()
{
return new MyStaticDataValue(defaultValue);
}
public string DataCurrent()
{
return defaultValue;
}
public string DataMoveNext()
{
return defaultValue;
}
public void DataReset()
{
}
public bool DataSet(string expectData)
{
if (expectData!=null)
{
defaultValue = expectData;
return true;
}
return false;
}
}
}
================================================
FILE: AutoTest/RunTimeStaticData/RunTimeStaticDataHelper.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FreeHttp.AutoTest.RunTimeStaticData
{
public static class RunTimeStaticDataHelper
{
public static bool AddStaticDataToCollection(ActuatorStaticDataCollection actuatorStaticDataCollection, CaseStaticDataType dataType, string staticDataKey, string staticDataVaule, out string errorMes)
{
errorMes = null;
if (actuatorStaticDataCollection==null)
{
errorMes = "your ActuatorStaticDataCollection is null";
return false;
}
if (actuatorStaticDataCollection.IsHaveSameKey(staticDataKey))
{
errorMes = (string.Format("find same key 【{0}】in RunTimeParameter with [ CaseStaticDataClass.caseStaticDataKey] in - ScriptRunTime ,and will drop this key", staticDataKey));
return false;
}
switch(CaseRunTimeDataTypeEngine.dictionaryStaticDataTypeClass[dataType])
{
case CaseStaticDataClass.caseStaticDataKey:
if (dataType == CaseStaticDataType.caseStaticData_vaule)
{
if (!actuatorStaticDataCollection.AddStaticDataKey(staticDataKey, new FreeHttp.AutoTest.RunTimeStaticData.MyStaticData.MyStaticDataValue(staticDataVaule)))
{
errorMes = (string.Format("can not add {0} into ActuatorStaticDataCollection", staticDataKey));
return false;
}
//runActuatorStaticDataCollection.RunActuatorStaticDataKeyList.MyAdd(new KeyValuePair<string, string>());
}
else
{
throw new Exception(string.Format("find nonsupport Protocol 【{0}】with [ CaseStaticDataClass.caseStaticDataKey] in - ScriptRunTime ", dataType));
}
break;
case CaseStaticDataClass.caseStaticDataParameter:
IRunTimeStaticData tempRunTimeStaticData;
string tempTypeError;
if (CaseRunTimeDataTypeEngine.dictionaryStaticDataParameterAction[dataType](out tempRunTimeStaticData, out tempTypeError, staticDataVaule))
{
if (!actuatorStaticDataCollection.AddStaticDataParameter(staticDataKey, tempRunTimeStaticData))
{
errorMes = (string.Format("can not add {0} into ActuatorStaticDataCollection", staticDataKey));
return false;
}
//runActuatorStaticDataCollection.RunActuatorStaticDataParameterList.MyAdd(tempName, tempRunTimeStaticData);
}
else
{
errorMes = string.Format("find error in 【RunTimeStaticData】->【{0}】:value:【{1}】 by {2}", staticDataKey, staticDataVaule, tempTypeError);
return false;
}
break;
case CaseStaticDataClass.caseStaticDataSource:
IRunTimeDataSource tempRunTimeDataSource;
if (CaseRunTimeDataTypeEngine.dictionaryStaticDataSourceAction[dataType](out tempRunTimeDataSource, out tempTypeError, staticDataVaule))
{
if (!actuatorStaticDataCollection.AddStaticDataSouce(staticDataKey, tempRunTimeDataSource))
{
errorMes = (string.Format("can not add {0} into ActuatorStaticDataCollection", staticDataKey));
return false;
}
//runActuatorStaticDataCollection.RunActuatorStaticDataSouceList.MyAdd<IRunTimeDataSource>(tempName, tempRunTimeDataSource);
}
else
{
errorMes = (string.Format("find error in 【RunTimeStaticData】->【{0}】:value:【{1}】 by {2}", staticDataKey, staticDataVaule, tempTypeError));
return false;
}
break;
default:
throw new Exception(" find nonsupport CaseStaticDataClass");
}
return true;
}
}
}
================================================
FILE: FiddlerFreeHttp.cs
================================================
using Fiddler;
using FreeHttp.AutoTest.RunTimeStaticData;
using FreeHttp.FiddlerHelper;
using FreeHttp.FreeHttpControl;
using FreeHttp.MyHelper;
using FreeHttp.WebService;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
/*******************************************************************************
* Copyright (c) 2018 lulianqi
* All rights reserved.
*
* 文件名称:
* 内容摘要: mycllq@hotmail.com
*
* 历史记录:
* 日 期: 20181103 创建人: lulianqi [mycllq@hotmail.com]
* 描 述: 创建
*
* 历史记录:
* 日 期: 修改:
* 描 述:
*******************************************************************************/
[assembly: Fiddler.RequiredVersion("2.3.5.0")]
namespace FreeHttp
{
public class FiddlerFreeHttp : IAutoTamper, IDisposable
{
private bool isOnLoad = false; //是否已经加载过tab
private bool isCheckedUpdata = false; //是否已经成功完成更新检查,如果检查失败会被重新设置为false
private bool isInFreeHttpTab = false; //是否在正在FreeHttp Tab页中
private Image myIco;
private TabPage tabPage;
private FreeHttpWindow myFreeHttpWindow;
private UpgradeService upgradeService;
private OperationReportService operationReportService;
public bool IsSkipConnectTunnels
{
get
{
if (myFreeHttpWindow != null && myFreeHttpWindow.ModificSettingInfo != null)
return myFreeHttpWindow.ModificSettingInfo.IsSkipConnectTunnels;
else
return true;
}
}
public bool IsSkipUiHide
{
get
{
if (myFreeHttpWindow != null && myFreeHttpWindow.ModificSettingInfo != null)
return myFreeHttpWindow.ModificSettingInfo.IsSkipUiHide;
else
return true;
}
}
public bool IsOnlyMatchFistTamperRule
{
get
{
if (myFreeHttpWindow != null && myFreeHttpWindow.ModificSettingInfo != null)
return myFreeHttpWindow.ModificSettingInfo.IsOnlyMatchFirstTamperRule;
else
return false;
}
}
public bool IsHideFreeHttpSession
{
get
{
return isCheckedUpdata && myFreeHttpWindow.ModificSettingInfo.IsHideSelfSession;
}
}
private void ShowMes(string mes)
{
ShowMes(mes, false);
}
private void ShowMes(string mes , bool isReport = false)
{
if (!isOnLoad)
{
return;
}
if (isReport) _ = RemoteLogService.ReportLogAsync(mes, RemoteLogService.RemoteLogOperation.SessionTamp, RemoteLogService.RemoteLogType.Info);
if (myFreeHttpWindow.InvokeRequired)
{
//BeginInvoke,Invoke will execute in the contol ui thread, but Invoke will with the end in the ui thread
//myFreeHttpWindow.Invoke(new Action(()=>{System.Threading.Thread.Sleep(10000);}) );
myFreeHttpWindow.BeginInvoke(new Action<string>(myFreeHttpWindow.PutInfo), mes);
}
else
{
myFreeHttpWindow.PutInfo(mes);
}
}
private void ShowError(string mes)
{
ShowError(mes, true);
}
private void ShowError(string mes ,bool isReport = true)
{
if (!isOnLoad)
{
return;
}
AddFiddlerObjectLog(mes);
if(isReport) _ = RemoteLogService.ReportLogAsync(mes, RemoteLogService.RemoteLogOperation.SessionTamp, RemoteLogService.RemoteLogType.Error);
if (myFreeHttpWindow.InvokeRequired)
{
myFreeHttpWindow.BeginInvoke(new Action<string>(myFreeHttpWindow.PutError), mes);
}
else
{
myFreeHttpWindow.PutError(mes);
}
}
private void AddFiddlerObjectLog(string mes)
{
FiddlerObject.log(string.Format("【FiddlerFreeHttp】:{0}", mes));
}
private void SetStatusText(string mes)
{
FiddlerObject.StatusText = mes;
}
private void MarkSession(Session oSession)
{
oSession["ui-backcolor"] = "Khaki";
oSession["ui-bold"] = "true";
oSession["ui-color"] = "Indigo";
oSession.RefreshUI();
}
public void OnBeforeUnload()
{
SerializableHelper.SerializeRuleList(myFreeHttpWindow.RequestRuleListView, myFreeHttpWindow.ResponseRuleListView);
SerializableHelper.SerializeData<FiddlerModificSettingInfo>(myFreeHttpWindow.ModificSettingInfo, "FreeHttp\\FreeHttpSetting.xml");
SerializableHelper.SerializeContractData<ActuatorStaticDataCollection>(myFreeHttpWindow.StaticDataCollection, "FreeHttp\\FreeHttpStaticDataCollection.xml");
SerializableHelper.SerializeContractData<FiddlerRuleGroup>(myFreeHttpWindow.ModificRuleGroup, "FreeHttp\\FreeHttpModificRuleGroup.xml");
if (isInFreeHttpTab)
{
operationReportService.OutOperation(DateTime.Now, myFreeHttpWindow.RequestRuleListView.Items.Count, myFreeHttpWindow.ResponseRuleListView.Items.Count);
}
if (operationReportService.HasAnyOperation && IsSkipConnectTunnels)
{
operationReportService.StaticDataCollection = myFreeHttpWindow.StaticDataCollection.IsEmpty? null: myFreeHttpWindow.StaticDataCollection;
operationReportService.RuleGroup = myFreeHttpWindow.ModificRuleGroup.IsEmpty ? null : myFreeHttpWindow.ModificRuleGroup;
operationReportService.FiddlerRequestChangeRuleList = myFreeHttpWindow.FiddlerRequestChangeList;
operationReportService.FiddlerResponseChangeRuleList = myFreeHttpWindow.FiddlerResponseChangeList;
operationReportService.StartReportThread();
}
upgradeService.TrySilentUpgrade();
}
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.Synchronized)]
public void OnLoad()
{
AddFiddlerObjectLog("OnLoad");
//string workPath = string.Format("{0}\\FreeHttp", System.Windows.Forms.Application.StartupPath);
//System.Threading.Tasks.Task.Run(OnLoad);
string workPath = string.Format("{0}\\FreeHttp", Directory.GetCurrentDirectory());
if (!isOnLoad)
{
tabPage = new TabPage();
tabPage.Text = "Free Http";
if (FiddlerApplication.UI.tabsViews.ImageList != null)
{
myIco = FreeHttp.Resources.MyResource.freehttp;
FiddlerApplication.UI.tabsViews.ImageList.Images.Add(myIco);
tabPage.ImageIndex = FiddlerApplication.UI.tabsViews.ImageList.Images.Count - 1;
}
try
{
if (!Directory.Exists(workPath))
{
AddFiddlerObjectLog(string.Format("Create working directory {0}", workPath));
Directory.CreateDirectory(workPath);
}
AddFiddlerObjectLog(string.Format("load configuration"));
myFreeHttpWindow = new FreeHttpWindow(SerializableHelper.DeserializeRuleList(),
SerializableHelper.DeserializeData<FiddlerModificSettingInfo>("FreeHttp\\FreeHttpSetting.xml"),
SerializableHelper.DeserializeContractData<ActuatorStaticDataCollection>("FreeHttp\\FreeHttpStaticDataCollection.xml"),
SerializableHelper.DeserializeContractData<FiddlerRuleGroup>("FreeHttp\\FreeHttpModificRuleGroup.xml"));
}
catch (Exception ex)
{
AddFiddlerObjectLog(string.Format("load configuration fial ,{0}", ex.Message));
}
finally
{
if (myFreeHttpWindow == null)
{
myFreeHttpWindow = new FreeHttpWindow(null, null, null ,null);
}
}
myFreeHttpWindow.OnUpdataFromSession += myFreeHttpWindow_OnUpdataFromSession;
myFreeHttpWindow.OnGetSessionRawData += myFreeHttpWindow_OnGetSessionRawData;
myFreeHttpWindow.OnGetSessionEventArgs += MyFreeHttpWindow_OnGetSessionEventArgs;
myFreeHttpWindow.OnGetSessionSeekHead += myFreeHttpWindow_OnGetSessionSeekHead;
myFreeHttpWindow.OnShowInIndependentWindow += MyFreeHttpWindow_OnShowInIndependentWindow;
myFreeHttpWindow.Dock = DockStyle.Fill;
myFreeHttpWindow.Enter += myFreeHttpWindow_Enter;
tabPage.Controls.Add(myFreeHttpWindow);
FiddlerApplication.UI.tabsViews.TabPages.Add(tabPage);
Fiddler.FiddlerApplication.UI.Deactivate += UI_Deactivate;
FiddlerApplication.UI.tabsViews.SelectedIndexChanged += tabsViews_SelectedIndexChanged;
FiddlerApplication.OnWebSocketMessage += FiddlerApplication_OnWebSocketMessage;
FiddlerApplication.UI.tabsViews.ParentChanged += TabsViews_ParentChanged;
upgradeService = new UpgradeService();
upgradeService.GetUpgradeMes += upgradeService_GetUpgradeMes;
operationReportService = new OperationReportService();
isOnLoad = true;
}
}
private void TabsViews_ParentChanged(object sender, EventArgs e)
{
myFreeHttpWindow.FreeHttpWindowParentChanged(sender);
}
void tabsViews_SelectedIndexChanged(object sender, EventArgs e)
{
if (isCheckedUpdata == false && FiddlerApplication.UI.tabsViews.SelectedTab == tabPage)
{
isCheckedUpdata = true;
upgradeService.StartCheckUpgrade();
//upgradeService.StartCheckUpgradeThread();
}
//operation report
if (FiddlerApplication.UI.tabsViews.SelectedTab == tabPage)
{
isInFreeHttpTab = true;
operationReportService.InOperation(DateTime.Now);
myFreeHttpWindow.FreeHttpWindowSelectedChanged(true);
}
else if (isInFreeHttpTab)
{
isInFreeHttpTab = false;
operationReportService.OutOperation(DateTime.Now, myFreeHttpWindow.RequestRuleListView.Items.Count, myFreeHttpWindow.ResponseRuleListView.Items.Count);
myFreeHttpWindow.FreeHttpWindowSelectedChanged(false);
}
}
void myFreeHttpWindow_Enter(object sender, EventArgs e)
{
//when myFreeHttpWindow is enter do somethings
}
void UI_Deactivate(object sender, EventArgs e)
{
myFreeHttpWindow.CloseEditRtb();
}
private void upgradeService_GetUpgradeMes(object sender, UpgradeService.UpgradeServiceEventArgs e)
{
Action<string, string> ShowDialogResultBox = (message, title) =>
{
if (string.IsNullOrEmpty(e.UpgradeInfo.url))
{
MessageBox.Show(message, title);
}
else
{
if (MessageBox.Show(message, title,e.UpgradeInfo.isForceEnter? MessageBoxButtons.OK : MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK)
{
ShowMes(string.Format("enter message details [flag:{0}]", e.UpgradeInfo.messageFlag??"any"),true);
if (string.IsNullOrEmpty(e.UpgradeInfo.url))
{
MessageBox.Show("UpgradeInfo.url is error");
return;
}
try
{
System.Diagnostics.Process.Start(e.UpgradeInfo.url);
}
catch (Exception ex)
{
MessageBox.Show(string.Format("UpgradeMes is error \r\n{0}", ex.Message));
ShowError(string.Format("process start fail [{0}] [{1}] ", e.UpgradeInfo.url , ex.Message));
}
}
else
{
ShowMes(string.Format("cancel enter message details [flag:{0}]", e.UpgradeInfo.messageFlag ?? "any"),true);
}
}
};
if (e.IsSuccess)
{
if(!string.IsNullOrEmpty(e.UpgradeInfo.uuid)&& string.IsNullOrEmpty(myFreeHttpWindow.ModificSettingInfo.UserToken))
{
myFreeHttpWindow.ModificSettingInfo.UserToken = e.UpgradeInfo.uuid;
}
if (e.UpgradeInfo.isNeedUpdata && !e.UpgradeInfo.isSilentUpgrade)
{
//ShowDialogResultBox(string.IsNullOrEmpty(e.UpgradeInfo.message)?"Find new version for [ FreeHttp Plug-in ] \r\nDo you want goto upgrade page to udpade your FreeHttp" : e.UpgradeInfo.message , "find new version");
myFreeHttpWindow.Invoke(new Action(() => {
ShowDialogResultBox(string.IsNullOrEmpty(e.UpgradeInfo.message) ? "Find new version for [ FreeHttp Plug-in ] \r\nDo you want goto upgrade page to udpade your FreeHttp" : e.UpgradeInfo.message, "find new version");
}));
return;
}
else if(e.UpgradeInfo.isNeedUpdata && e.UpgradeInfo.isSilentUpgrade)
{
//Silent Upgrade
}
else if (e.UpgradeInfo.isShowMessage && !string.IsNullOrEmpty(e.UpgradeInfo.message))
{
//show meaasge
if(string.IsNullOrEmpty(e.UpgradeInfo.messageFlag))
{
myFreeHttpWindow.Invoke(new Action(() => {
ShowDialogResultBox(e.UpgradeInfo.message, "new message");
}));
}
else
{
if (!myFreeHttpWindow.ModificSettingInfo.ReadedMessageFlags.Contains(e.UpgradeInfo.messageFlag))
{
myFreeHttpWindow.Invoke(new Action(() =>
{
ShowDialogResultBox(e.UpgradeInfo.message, "new message");
}));
myFreeHttpWindow.ModificSettingInfo.ReadedMessageFlags.Add(e.UpgradeInfo.messageFlag);
}
}
}
else
{
//not any thing
}
}
else
{
isCheckedUpdata = false;
}
}
private void myFreeHttpWindow_OnGetSessionRawData(object sender, FreeHttpWindow.GetSessionRawDataEventArgs e)
{
Session tempSession = Fiddler.FiddlerObject.UI.GetFirstSelectedSession();
if (tempSession == null)
{
Fiddler.FiddlerObject.UI.ShowAlert(new frmAlert("STOP", "please select a session", "OK"));
FreeHttpWindow.MarkWarnControl(Fiddler.FiddlerApplication.UI.lvSessions);
return;
}
switch (e.SessionAction)
{
case FreeHttpWindow.GetSessionAction.ShowShowResponse:
string tempStr = FiddlerSessionTamper.GetSessionRawData(tempSession, true);
ShowMes(tempStr == null ? "error session" : string.Format("Get Raw Data\r\n{0}", tempStr));
myFreeHttpWindow.ShowOwnerWindow(tempSession.fullUrl, tempStr);
break;
case FreeHttpWindow.GetSessionAction.SetCookies:
myFreeHttpWindow.SetClientAddCookies(tempSession.RequestHeaders["Cookie"]);
break;
case FreeHttpWindow.GetSessionAction.DeleteCookies:
myFreeHttpWindow.SetClientDelCookies(tempSession.RequestHeaders["Cookie"]);
break;
default:
Fiddler.FiddlerObject.UI.ShowAlert(new frmAlert("STOP", "Not supported this SessionAction", "OK"));
break;
}
}
private void MyFreeHttpWindow_OnGetSessionEventArgs(object sender, FreeHttpWindow.GetSessionEventArgs e)
{
Session tempSession = Fiddler.FiddlerObject.UI.GetFirstSelectedSession();
if (tempSession == null)
{
e.IsGetSuccess = false;
}
else
{
e.IsGetSuccess = FiddlerSessionTamper.GetSessionData(tempSession, e);
}
}
private void myFreeHttpWindow_OnGetSessionSeekHead(object sender, FreeHttpWindow.GetSessionSeekHeadEventArgs e)
{
Session tempSession = Fiddler.FiddlerObject.UI.GetFirstSelectedSession();
if (tempSession == null)
{
FreeHttpWindow.MarkWarnControl(Fiddler.FiddlerApplication.UI.lvSessions);
}
else
{
if (e != null && e.ResquestHead.Key != null)
{
//HTTPHeaderItem nowHTTPHeaderItem = tempSession.RequestHeaders.First(hTTPHeaderItem => hTTPHeaderItem.Name == e.ResquestHead.Key);
HTTPHeaderItem nowHTTPHeaderItem = tempSession.RequestHeaders.FirstOrDefault(hTTPHeaderItem => hTTPHeaderItem.Name == e.ResquestHead.Key);
if (nowHTTPHeaderItem != null)
{
e.ResquestHead = new KeyValuePair<string, string>(nowHTTPHeaderItem.Name, nowHTTPHeaderItem.Value);
e.SeekUri = tempSession.fullUrl;
}
}
if (e != null && e.ResponseHead.Key != null)
{
HTTPHeaderItem nowHTTPHeaderItem = tempSession.ResponseHeaders.FirstOrDefault(hTTPHeaderItem => hTTPHeaderItem.Name == e.ResponseHead.Key);
if (nowHTTPHeaderItem != null)
{
e.ResponseHead = new KeyValuePair<string, string>(nowHTTPHeaderItem.Name, nowHTTPHeaderItem.Value);
e.SeekUri = tempSession.fullUrl;
}
}
}
}
private void MyFreeHttpWindow_OnShowInIndependentWindow(object sender, bool e)
{
if(e)
{
myFreeHttpWindow.FreeHttpWindowParentChanged(sender);
Form newForm = new Form();
newForm.Icon = FreeHttp.Resources.MyResource.freehttpico;
newForm.Text = "FreeHttp";
newForm.Size = tabPage.Size;
newForm.FormClosing += new FormClosingEventHandler((yourSender, yourE) => {
myFreeHttpWindow.FreeHttpWindowParentChanged(sender);
MyControlHelper.SetControlFreeze(tabPage);
myFreeHttpWindow.independentWindowToolStripMenuItem.Text = "independent window";
tabPage.Controls.Clear();
tabPage.Controls.Add(myFreeHttpWindow);
MyControlHelper.SetControlUnfreeze(tabPage);
});
MyControlHelper.SetControlFreeze(newForm);
Label lb_info = new Label();
lb_info.Text = "closing...";
lb_info.ForeColor = Color.Blue;
lb_info.Location = new Point((newForm.Width - lb_info.Width) / 2, (newForm.Height - lb_info.Height) / 2);
lb_info.Anchor = AnchorStyles.None;
newForm.Controls.Add(lb_info);
newForm.Controls.Add(myFreeHttpWindow);
lb_info.SendToBack();
MyControlHelper.SetControlUnfreeze(newForm);
newForm.Show();
LinkLabel llb_info = new LinkLabel();
llb_info.Text = "FreeHttp is in independent mode";
llb_info.ForeColor = Color.Blue;
llb_info.AutoSize = true;
llb_info.Location = new Point((tabPage.Width - llb_info.Width) / 2, (tabPage.Height - llb_info.Height) / 2);
llb_info.Anchor = AnchorStyles.None;
llb_info.LinkClicked += new LinkLabelLinkClickedEventHandler((yourSender, yourE) => { newForm.Activate(); });
tabPage.Controls.Add(llb_info);
LinkLabel llb_infoRecover = new LinkLabel();
llb_infoRecover.Text = "recover to addin mode";
llb_infoRecover.ForeColor = Color.Blue;
llb_infoRecover.AutoSize = true;
llb_infoRecover.Location = new Point((tabPage.Width - llb_infoRecover.Width) / 2, ((tabPage.Height - llb_infoRecover.Height) / 2) + 20);
llb_infoRecover.Anchor = AnchorStyles.None;
llb_infoRecover.LinkClicked += new LinkLabelLinkClickedEventHandler((yourSender, yourE) => { myFreeHttpWindow.independentWindowToolStripMenuItem_Click(null, null);});
tabPage.Controls.Add(llb_infoRecover);
}
else
{
(myFreeHttpWindow.Parent as Form)?.Close();
}
}
private void myFreeHttpWindow_OnUpdataFromSession(object sender, EventArg
gitextract_sk9eg1ll/ ├── .dockerignore ├── .gitattributes ├── .gitignore ├── AutoTest/ │ ├── CsvFileHelper.cs │ ├── MyBytesHelper.cs │ ├── MyCommonTool.cs │ ├── MyExtensionMethods.cs │ ├── ParameterizationContent/ │ │ ├── CaseParameterizationContent.cs │ │ ├── ParameterizationContentEncodingType.cs │ │ └── ParameterizationContentHelper.cs │ ├── ParameterizationPick/ │ │ ├── ParameterPick.cs │ │ ├── ParameterPickHelper.cs │ │ └── ParameterPickType.cs │ └── RunTimeStaticData/ │ ├── ActuatorStaticDataCollection.cs │ ├── CaseRunTimeDataTypeEngine.cs │ ├── CaseStaticDataType.cs │ ├── IRunTimeDataSource.cs │ ├── IRunTimeStaticData.cs │ ├── MyStaticData/ │ │ ├── MyStaticDataIndex.cs │ │ ├── MyStaticDataList.cs │ │ ├── MyStaticDataLong.cs │ │ ├── MyStaticDataNowTime.cs │ │ ├── MyStaticDataRandomStr.cs │ │ ├── MyStaticDataSourceCsv.cs │ │ ├── MyStaticDataStrIndex.cs │ │ └── MyStaticDataValue.cs │ └── RunTimeStaticDataHelper.cs ├── FiddlerFreeHttp.cs ├── FiddlerHelper/ │ ├── FiddlerActuatorStaticDataCollectionController.cs │ ├── FiddlerHttpFilter.cs │ ├── FiddlerModificHttpRuleCollection.cs │ ├── FiddlerModificSettingInfo.cs │ ├── FiddlerRequsetChange.cs │ ├── FiddlerResponseChange.cs │ ├── FiddlerRuleGroup.cs │ ├── FiddlerSessionHelper.cs │ ├── IFiddlerHttpTamper.cs │ ├── TamperProtocalType.cs │ └── VersionControl/ │ └── FiddlerModificHttpRuleCollectionV1.cs ├── FiddlerSessionTamper.cs ├── FreeHttp.csproj ├── FreeHttp.sln ├── FreeHttpControl/ │ ├── ChangeEncodeForm.Designer.cs │ ├── ChangeEncodeForm.cs │ ├── ChangeEncodeForm.resx │ ├── ControlHelper/ │ │ ├── LoadBitmap.cs │ │ ├── LoadWindowService.cs │ │ ├── MarkControlService.cs │ │ └── MyControlHelper.cs │ ├── EditCookieForm.Designer.cs │ ├── EditCookieForm.cs │ ├── EditCookieForm.resx │ ├── EditKeyVaule.Designer.cs │ ├── EditKeyVaule.cs │ ├── EditKeyVaule.resx │ ├── EditParameterPickWindow.Designer.cs │ ├── EditParameterPickWindow.cs │ ├── EditParameterPickWindow.resx │ ├── EditSheetForm.Designer.cs │ ├── EditSheetForm.cs │ ├── EditSheetForm.resx │ ├── FreeHttpWindow.Designer.cs │ ├── FreeHttpWindow.cs │ ├── FreeHttpWindow.resx │ ├── FreeHttpWindowFunction.cs │ ├── GetRemoteRuleWindow.Designer.cs │ ├── GetRemoteRuleWindow.cs │ ├── GetRemoteRuleWindow.resx │ ├── HttpFilterWindow.Designer.cs │ ├── HttpFilterWindow.cs │ ├── HttpFilterWindow.resx │ ├── MyBaseInfoWindow.cs │ ├── MyBaseInfoWindow.resx │ ├── MyControl/ │ │ ├── AddParameterPickBox.Designer.cs │ │ ├── AddParameterPickBox.cs │ │ ├── AddParameterPickBox.resx │ │ ├── CBalloonBase.cs │ │ ├── CBalloonBase.resx │ │ ├── EditListView.Designer.cs │ │ ├── EditListView.cs │ │ ├── EditListView.resx │ │ ├── ListViewExtended.cs │ │ ├── MyEnableSwitch.Designer.cs │ │ ├── MyEnableSwitch.cs │ │ ├── MyEnableSwitch.resx │ │ ├── MyEnabledPictureButton.cs │ │ ├── MyListView.cs │ │ ├── MyListView.resx │ │ ├── MyPanel.cs │ │ ├── MySwitchPictureButton.cs │ │ ├── RawRequestEdit.Designer.cs │ │ ├── RawRequestEdit.cs │ │ ├── RawRequestEdit.resx │ │ ├── RawResponseEdit.cs │ │ ├── RawResponseEdit.designer.cs │ │ ├── RawResponseEdit.resx │ │ ├── TextBoxEditer.Designer.cs │ │ ├── TextBoxEditer.cs │ │ ├── TextBoxEditer.resx │ │ └── WatermakTextBox.cs │ ├── RemoveHead.Designer.cs │ ├── RemoveHead.cs │ ├── RemoveHead.resx │ ├── RuleInfoWindow.cs │ ├── RuleInfoWindow.designer.cs │ ├── RuleInfoWindow.resx │ ├── SaveShareRule.Designer.cs │ ├── SaveShareRule.cs │ ├── SaveShareRule.resx │ ├── SetVaule.Designer.cs │ ├── SetVaule.cs │ ├── SetVaule.resx │ ├── SettingWindow.Designer.cs │ ├── SettingWindow.cs │ ├── SettingWindow.resx │ ├── ShowSheetForm.Designer.cs │ ├── ShowSheetForm.cs │ ├── ShowSheetForm.resx │ ├── ShowTextForm.Designer.cs │ ├── ShowTextForm.cs │ ├── ShowTextForm.resx │ ├── SortRule.Designer.cs │ ├── SortRule.cs │ ├── SortRule.resx │ ├── StaticDataAddWindow.Designer.cs │ ├── StaticDataAddWindow.cs │ ├── StaticDataAddWindow.resx │ ├── StaticDataManageWindow.Designer.cs │ ├── StaticDataManageWindow.cs │ ├── StaticDataManageWindow.resx │ ├── UserFeedbackWindow.Designer.cs │ ├── UserFeedbackWindow.cs │ └── UserFeedbackWindow.resx ├── HttpHelper/ │ ├── ContentModific.cs │ ├── HttpRequest.cs │ ├── HttpResponse.cs │ ├── ParameterContentModific.cs │ ├── ParameterHttpRequest.cs │ └── ParameterHttpResponse.cs ├── LICENSE ├── MyHelper/ │ ├── MyExtensionMethods.cs │ ├── MyGlobalHelper.cs │ ├── MyJsonHelper.cs │ ├── MyKeyValuePair.cs │ ├── SelfUpgradeHelp.cs │ └── SerializableHelper.cs ├── Properties/ │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Resources/ │ ├── MyResource.Designer.cs │ └── MyResource.resx ├── WebService/ │ ├── ConfigurationData.cs │ ├── DataModel/ │ │ ├── BaseResultModel.cs │ │ ├── RuleDetails.cs │ │ └── ShareRuleSummary.cs │ ├── FeedbackService.cs │ ├── HttpServer/ │ │ ├── CertificatesHelper.cs │ │ ├── MyHttpListener.cs │ │ └── MySocketHelper.cs │ ├── MyWebTool.cs │ ├── OperationReportService.cs │ ├── RemoteLogService.cs │ ├── RemoteRuleService.cs │ ├── ShareRuleService.cs │ ├── UpgradeService.cs │ └── UserComputerInfo.cs ├── packages.config └── readme.md
SYMBOL INDEX (1061 symbols across 129 files)
FILE: AutoTest/CsvFileHelper.cs
class CsvFileHelper (line 31) | public sealed class CsvFileHelper : IDisposable
type Type (line 82) | public enum Type
method CsvFileHelper (line 96) | public CsvFileHelper(string filePath):this(filePath, Encoding.Default)
method CsvFileHelper (line 105) | public CsvFileHelper(string filePath, Encoding encoding)
method CsvFileHelper (line 124) | public CsvFileHelper(Stream stream):this(stream, Encoding.Default)
method CsvFileHelper (line 133) | public CsvFileHelper(Stream stream, Encoding encoding)
method CsvFileHelper (line 152) | public CsvFileHelper(Stream stream, Encoding encoding, char yourSepara...
method ParseLine (line 158) | private List<string> ParseLine(string line)
method ParseContinueLine (line 258) | private List<string> ParseContinueLine(string line)
method GetListCsvData (line 307) | public List<List<string>> GetListCsvData()
method Dispose (line 337) | public void Dispose()
method CsvFileHelper (line 506) | static CsvFileHelper()
method WriteCsvVeiw (line 544) | private static void WriteCsvVeiw(List<List<string>> yourListCsvData, T...
method WriteCsvLine (line 556) | private static void WriteCsvLine(List<string> fields, TextWriter writer)
method SaveCsvFile (line 600) | public static void SaveCsvFile(string yourFilePath,List<List<string>> ...
method SaveCsvFile (line 633) | public static void SaveCsvFile(string yourFilePath, List<List<string>>...
method OpenFile (line 638) | public static Stream OpenFile(string filePath)
FILE: AutoTest/MyBytesHelper.cs
type ShowHexMode (line 12) | public enum ShowHexMode
type HexDecimal (line 30) | public enum HexDecimal
class MyBytes (line 37) | public class MyBytes
method StringToHexString (line 50) | public static string StringToHexString(string yourStr)
method StringToHexString (line 63) | public static string StringToHexString(string yourStr, Encoding encode...
method ByteToHexString (line 76) | public static string ByteToHexString(byte[] yourBytes, HexDecimal hexD...
method HexStringToByte (line 100) | public static byte[] HexStringToByte(string yourStr, HexDecimal hexDec...
method HexStringToByte (line 154) | public static byte[] HexStringToByte(string yourStr, HexDecimal hexDec...
method ByteToSring (line 165) | public static bool ByteToSring(byte[] yourBytes, Encoding yourEncoding...
method StringToByte (line 178) | public static bool StringToByte(string yourStr, Encoding yourEncoding,...
method IsBytesSame (line 199) | public static bool IsBytesSame(byte[] bytesA, byte[] bytesB)
method RmBytesEnd (line 227) | public static byte[] RmBytesEnd(byte[] yourBytes)
method CreatRandomBytes (line 258) | public static byte[] CreatRandomBytes(int byteLen)
method GetIpByBytes (line 277) | public static string GetIpByBytes(byte[] yourData)
method GetByteLen (line 304) | public static int GetByteLen(byte[] yourLen)
method CreateInt16Bytes (line 327) | public static byte[] CreateInt16Bytes(int yourLen)
method GroupByteList (line 357) | public static byte[] GroupByteList(List<byte[]> yourByteList)
method ReplaceBytes (line 386) | public static byte[] ReplaceBytes(byte[] src, byte[] search, byte[] repl)
method FindBytes (line 404) | public static int FindBytes(byte[] src, byte[] find)
FILE: AutoTest/MyCommonTool.cs
class MyCommonTool (line 9) | public static class MyCommonTool
method GenerateRandomStr (line 24) | public static string GenerateRandomStr(int strCount, int GenerateType)
FILE: AutoTest/MyExtensionMethods.cs
class MyExtensionMethods (line 10) | public static class MyExtensionMethods
method MySplitToIntArray (line 19) | public static bool MySplitToIntArray(this string str, char yourSplitCh...
method MySplitIntEnd (line 46) | public static bool MySplitIntEnd(this string str, char yourSplitChar, ...
method MyAdd (line 77) | public static void MyAdd(this Dictionary<string, string> dc, string yo...
method MyAdd (line 96) | public static void MyAdd<T>(this Dictionary<string, T> dc, string your...
method MyAdd (line 114) | public static void MyAdd(this NameValueCollection nvc, string yourName...
method MyToFormatString (line 127) | public static string MyToFormatString(this NameValueCollection nvc)
method MyClone (line 159) | public static Dictionary<TKey, TValue> MyClone<TKey, TValue>(this Dict...
method MyDeepClone (line 176) | public static Dictionary<TKey, TValue> MyDeepClone<TKey, TValue>(this ...
method ToChangeType (line 186) | public static Dictionary<string, TTargetValue> ToChangeType<TValue,TTa...
method Add (line 200) | public static void Add(this List<List<string>> myList, object[] yourVa...
FILE: AutoTest/ParameterizationContent/CaseParameterizationContent.cs
class CaseParameterizationContent (line 14) | [Serializable]
method CaseParameterizationContent (line 21) | public CaseParameterizationContent()
method CaseParameterizationContent (line 27) | public CaseParameterizationContent(string yourContentData, bool isPara...
method CaseParameterizationContent (line 33) | public CaseParameterizationContent(string yourContentData)
method IsFilled (line 44) | public bool IsFilled()
method GetTargetContentData (line 63) | public string GetTargetContentData(ActuatorStaticDataCollection yourAc...
method GetTargetContentData (line 131) | public string GetTargetContentData()
method ToString (line 136) | public override string ToString()
FILE: AutoTest/ParameterizationContent/ParameterizationContentEncodingType.cs
type ParameterizationContentEncodingType (line 12) | [Serializable]
FILE: AutoTest/ParameterizationContent/ParameterizationContentHelper.cs
class ParameterizationContentHelper (line 11) | public static class ParameterizationContentHelper
method GetCurrentParametersData (line 24) | public static string GetCurrentParametersData(string yourSourceData, s...
method TryGetParametersAdditionData (line 188) | private static string TryGetParametersAdditionData(string souceData, o...
class MyConfiguration (line 217) | public class MyConfiguration
FILE: AutoTest/ParameterizationPick/ParameterPick.cs
class ParameterPick (line 11) | [Serializable]
method ToString (line 26) | public override string ToString()
class ParameterPickInfo (line 32) | public class ParameterPickInfo
method ParameterPickInfo (line 39) | public ParameterPickInfo(ParameterPickType pickType, List<KeyValuePair...
class ParameterPickTypeEngine (line 49) | public class ParameterPickTypeEngine
FILE: AutoTest/ParameterizationPick/ParameterPickHelper.cs
class ParameterPickHelper (line 11) | public class ParameterPickHelper
method PickXmlParameter (line 20) | public static string[] PickXmlParameter(string yourTarget, string your...
method PickRegexParameter (line 53) | public static string[] PickRegexParameter(string yourTarget, string yo...
method PickStrParameter (line 76) | public static string PickStrParameter(int yourStrStart, int yourStrLen...
method PickStrParameter (line 93) | public static string PickStrParameter(string yourTarget, int yourStrLe...
method PickStrParameter (line 116) | public static string PickStrParameter(string yourTarget, string yourSt...
method GetStrPickData (line 133) | public static bool GetStrPickData(string yourSouce, out string yourFro...
method ParameterPickStr (line 150) | public static string ParameterPickStr(string sourceStr,string pickExpr...
method ParameterPickXml (line 193) | public static string ParameterPickXml(string sourceStr, string pickExp...
method ParameterPickRegex (line 227) | public static string ParameterPickRegex(string sourceStr, string pickE...
method CheckParameterPickExpression (line 263) | public static string CheckParameterPickExpression(ParameterPick yourPa...
FILE: AutoTest/ParameterizationPick/ParameterPickType.cs
type ParameterPickType (line 10) | [Serializable]
type ParameterPickRange (line 19) | [Serializable]
FILE: AutoTest/RunTimeStaticData/ActuatorStaticDataCollection.cs
class ActuatorStaticDataCollection (line 16) | [DataContract] //[Serializable] 默认序列化公开字段及属性,且要求其有公开的Set,用[DataContract...
class ChangeDataEventArgs (line 20) | public class ChangeDataEventArgs : EventArgs
method ChangeDataEventArgs (line 23) | public ChangeDataEventArgs(bool isAddOrDel)
method ActuatorStaticDataCollection (line 82) | public ActuatorStaticDataCollection()
method ActuatorStaticDataCollection (line 90) | public ActuatorStaticDataCollection(bool isAllCollectionKeyUnique):this()
method ActuatorStaticDataCollection (line 95) | public ActuatorStaticDataCollection(Dictionary<string, IRunTimeStaticD...
method OnListChanged (line 107) | private void OnListChanged(bool isAddOrDel)
method IsHasSameKey (line 144) | private object IsHasSameKey(string key, int ignoreListIndex)
method IsHaveSameKey (line 166) | public bool IsHaveSameKey(string yourKey)
method AddStaticDataKey (line 177) | [MethodImplAttribute(MethodImplOptions.Synchronized)]
method AddStaticDataParameter (line 202) | [MethodImplAttribute(MethodImplOptions.Synchronized)]
method AddStaticDataSouce (line 223) | [MethodImplAttribute(MethodImplOptions.Synchronized)]
method AddStaticData (line 244) | [MethodImplAttribute(MethodImplOptions.Synchronized)]
method RemoveStaticData (line 275) | [MethodImplAttribute(MethodImplOptions.Synchronized)]
method SetStaticDataValue (line 385) | [MethodImplAttribute(MethodImplOptions.Synchronized)]
method GetStaticData (line 401) | public IRunTimeStaticData GetStaticData(string key ,int GetListIndex)
method GetEnumerator (line 465) | public IEnumerator GetEnumerator()
method Clone (line 470) | public object Clone()
method Dispose (line 475) | public void Dispose()
class ActuatorStaticDataEnum (line 482) | public class ActuatorStaticDataEnum : IEnumerator
method ActuatorStaticDataEnum (line 496) | internal ActuatorStaticDataEnum(ActuatorStaticDataCollection actuato...
method MoveNext (line 518) | public bool MoveNext()
method Reset (line 572) | public void Reset()
FILE: AutoTest/RunTimeStaticData/CaseRunTimeDataTypeEngine.cs
class CaseRunTimeDataTypeEngine (line 16) | public class CaseRunTimeDataTypeEngine
method GetIndexStaticData (line 80) | public static bool GetIndexStaticData(out IRunTimeStaticData yourStati...
method GetStrIndexStaticData (line 112) | public static bool GetStrIndexStaticData(out IRunTimeStaticData yourSt...
method GetLongStaticData (line 160) | public static bool GetLongStaticData(out IRunTimeStaticData yourStatic...
method GetTimeStaticData (line 192) | public static bool GetTimeStaticData(out IRunTimeStaticData yourStatic...
method GetRandomStaticData (line 209) | public static bool GetRandomStaticData(out IRunTimeStaticData yourStat...
method GetListStaticData (line 235) | public static bool GetListStaticData(out IRunTimeStaticData yourStatic...
method GetCsvStaticDataSource (line 268) | public static bool GetCsvStaticDataSource(out IRunTimeDataSource yourS...
FILE: AutoTest/RunTimeStaticData/CaseStaticDataType.cs
type CaseStaticDataType (line 9) | public enum CaseStaticDataType
type CaseStaticDataClass (line 28) | public enum CaseStaticDataClass
FILE: AutoTest/RunTimeStaticData/IRunTimeDataSource.cs
type IRunTimeDataSource (line 9) | public interface IRunTimeDataSource : IRunTimeStaticData
method ConnectDataSource (line 20) | bool ConnectDataSource();
method DisConnectDataSource (line 26) | bool DisConnectDataSource();
method GetDataVaule (line 33) | string GetDataVaule(string vauleAddress);
method DataSet (line 41) | bool DataSet(string vauleAddress, string expectData);
FILE: AutoTest/RunTimeStaticData/IRunTimeStaticData.cs
type IRunTimeStaticData (line 16) | public interface IRunTimeStaticData : ICloneable
method DataCurrent (line 46) | string DataCurrent();
method DataMoveNext (line 51) | string DataMoveNext();
method DataReset (line 55) | void DataReset();
method DataSet (line 61) | bool DataSet(string expectData);
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataIndex.cs
class MyStaticDataIndex (line 13) | [DataContract]
method MyStaticDataIndex (line 37) | public MyStaticDataIndex(int yourStart, int yourEnd, int yourStep)
method MyStaticDataIndex (line 45) | public MyStaticDataIndex(int yourStart, int yourEnd, int yourStep, str...
method Clone (line 51) | public object Clone()
method DataCurrent (line 57) | public string DataCurrent()
method DataMoveNext (line 62) | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerSer...
method DataReset (line 83) | public void DataReset()
method DataSet (line 90) | public bool DataSet(string expectData)
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataList.cs
class MyStaticDataList (line 13) | [DataContract]
method MyStaticDataList (line 38) | public MyStaticDataList(string yourSourceData, bool isRandomNext)
method MyStaticDataList (line 55) | public MyStaticDataList(string yourSourceData, bool isRandomNext, stri...
method Clone (line 61) | public object Clone()
method DataCurrent (line 66) | public string DataCurrent()
method DataMoveNext (line 71) | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerSer...
method DataReset (line 97) | public void DataReset()
method DataSet (line 103) | public bool DataSet(string expectData)
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataLong.cs
class MyStaticDataLong (line 13) | [DataContract]
method MyStaticDataLong (line 37) | public MyStaticDataLong(long yourStart, long yourEnd, long yourStep)
method MyStaticDataLong (line 45) | public MyStaticDataLong(long yourStart, long yourEnd, long yourStep, s...
method Clone (line 51) | public object Clone()
method DataCurrent (line 57) | public string DataCurrent()
method DataMoveNext (line 62) | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerSer...
method DataReset (line 86) | public void DataReset()
method DataSet (line 93) | public bool DataSet(string expectData)
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataNowTime.cs
class MyStaticDataNowTime (line 13) | [DataContract]
method MyStaticDataNowTime (line 33) | public MyStaticDataNowTime(string yourRormatInfo)
method MyStaticDataNowTime (line 50) | public MyStaticDataNowTime(string yourRormatInfo, string originalConne...
method Clone (line 56) | public object Clone()
method DataCurrent (line 61) | public string DataCurrent()
method DataMoveNext (line 66) | public string DataMoveNext()
method DataReset (line 79) | public void DataReset()
method DataSet (line 85) | public bool DataSet(string expectData)
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataRandomStr.cs
class MyStaticDataRandomStr (line 13) | [DataContract]
method MyStaticDataRandomStr (line 33) | public MyStaticDataRandomStr(int yourStrNum, int yourStrType)
method MyStaticDataRandomStr (line 40) | public MyStaticDataRandomStr(int yourStrNum, int yourStrType, string o...
method Clone (line 46) | public object Clone()
method DataCurrent (line 51) | public string DataCurrent()
method DataMoveNext (line 56) | public string DataMoveNext()
method DataReset (line 62) | public void DataReset()
method DataSet (line 68) | public bool DataSet(string expectData)
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataSourceCsv.cs
class MyStaticDataSourceCsv (line 11) | [DataContract]
method MyStaticDataSourceCsv (line 33) | public MyStaticDataSourceCsv(List<List<string>> yourCsvData)
method MyStaticDataSourceCsv (line 44) | public MyStaticDataSourceCsv(List<List<string>> yourCsvData, string or...
method Clone (line 49) | public object Clone()
method ConnectDataSource (line 58) | public bool ConnectDataSource()
method DisConnectDataSource (line 63) | public bool DisConnectDataSource()
method GetDataSource (line 68) | public List<List<string>> GetDataSource()
method SetDataSource (line 73) | public bool SetDataSource(List<List<string>> yourDataSource)
method GetDataVaule (line 94) | public string GetDataVaule(string vauleAddress)
method GetDataVaule (line 110) | public string GetDataVaule(int yourRowIndex, int yourColumnIndex)
method DataCurrent (line 122) | public string DataCurrent()
method DataMoveNext (line 128) | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerSer...
method DataReset (line 155) | public void DataReset()
method DataExpressionSet (line 168) | public bool DataExpressionSet(string ExpressionData)
method DataSet (line 189) | public bool DataSet(string expectData)
method DataSet (line 199) | public bool DataSet(int yourRowIndex, int yourColumnIndex, string expe...
method DataSet (line 223) | public bool DataSet(string vauleAddress, string expectData)
method SetDataLocation (line 239) | public bool SetDataLocation(int yourRowIndex, int yourColumnIndex)
method GetDataLocation (line 254) | public Point GetDataLocation()
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataStrIndex.cs
class MyStaticDataStrIndex (line 13) | [DataContract]
method MyStaticDataStrIndex (line 40) | public MyStaticDataStrIndex(long yourStart, long yourEnd, long yourSte...
method MyStaticDataStrIndex (line 49) | public MyStaticDataStrIndex(long yourStart, long yourEnd, long yourSte...
method Clone (line 55) | public object Clone()
method GetLenStr (line 60) | private string GetLenStr(long yourLeng)
method DataCurrent (line 74) | public string DataCurrent()
method DataMoveNext (line 79) | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerSer...
method DataReset (line 100) | public void DataReset()
method DataSet (line 107) | public bool DataSet(string expectData)
FILE: AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataValue.cs
class MyStaticDataValue (line 10) | [DataContract]
method MyStaticDataValue (line 30) | public MyStaticDataValue(string yourVaule)
method Clone (line 36) | public object Clone()
method DataCurrent (line 42) | public string DataCurrent()
method DataMoveNext (line 47) | public string DataMoveNext()
method DataReset (line 53) | public void DataReset()
method DataSet (line 59) | public bool DataSet(string expectData)
FILE: AutoTest/RunTimeStaticData/RunTimeStaticDataHelper.cs
class RunTimeStaticDataHelper (line 9) | public static class RunTimeStaticDataHelper
method AddStaticDataToCollection (line 11) | public static bool AddStaticDataToCollection(ActuatorStaticDataCollect...
FILE: FiddlerFreeHttp.cs
class FiddlerFreeHttp (line 35) | public class FiddlerFreeHttp : IAutoTamper, IDisposable
method ShowMes (line 87) | private void ShowMes(string mes)
method ShowMes (line 91) | private void ShowMes(string mes , bool isReport = false)
method ShowError (line 110) | private void ShowError(string mes)
method ShowError (line 115) | private void ShowError(string mes ,bool isReport = true)
method AddFiddlerObjectLog (line 133) | private void AddFiddlerObjectLog(string mes)
method SetStatusText (line 137) | private void SetStatusText(string mes)
method MarkSession (line 142) | private void MarkSession(Session oSession)
method OnBeforeUnload (line 149) | public void OnBeforeUnload()
method OnLoad (line 171) | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerSer...
method TabsViews_ParentChanged (line 234) | private void TabsViews_ParentChanged(object sender, EventArgs e)
method tabsViews_SelectedIndexChanged (line 239) | void tabsViews_SelectedIndexChanged(object sender, EventArgs e)
method myFreeHttpWindow_Enter (line 263) | void myFreeHttpWindow_Enter(object sender, EventArgs e)
method UI_Deactivate (line 269) | void UI_Deactivate(object sender, EventArgs e)
method upgradeService_GetUpgradeMes (line 275) | private void upgradeService_GetUpgradeMes(object sender, UpgradeServic...
method myFreeHttpWindow_OnGetSessionRawData (line 360) | private void myFreeHttpWindow_OnGetSessionRawData(object sender, FreeH...
method MyFreeHttpWindow_OnGetSessionEventArgs (line 387) | private void MyFreeHttpWindow_OnGetSessionEventArgs(object sender, Fre...
method myFreeHttpWindow_OnGetSessionSeekHead (line 399) | private void myFreeHttpWindow_OnGetSessionSeekHead(object sender, Free...
method MyFreeHttpWindow_OnShowInIndependentWindow (line 432) | private void MyFreeHttpWindow_OnShowInIndependentWindow(object sender,...
method myFreeHttpWindow_OnUpdataFromSession (line 486) | private void myFreeHttpWindow_OnUpdataFromSession(object sender, Event...
method FiddlerApplication_OnWebSocketMessage (line 502) | private void FiddlerApplication_OnWebSocketMessage(object sender, WebS...
method AutoTamperRequestAfter (line 582) | public void AutoTamperRequestAfter(Session oSession)
method AutoTamperRequestBefore (line 588) | public void AutoTamperRequestBefore(Session oSession)
method AutoTamperResponseAfter (line 665) | public void AutoTamperResponseAfter(Session oSession)
method AutoTamperResponseBefore (line 710) | public void AutoTamperResponseBefore(Session oSession)
method OnBeforeReturningError (line 715) | public void OnBeforeReturningError(Session oSession)
method Dispose (line 721) | public void Dispose()
FILE: FiddlerHelper/FiddlerActuatorStaticDataCollectionController.cs
class FiddlerActuatorStaticDataCollectionController (line 11) | public class FiddlerActuatorStaticDataCollectionController
method FiddlerActuatorStaticDataCollectionController (line 15) | public FiddlerActuatorStaticDataCollectionController(ActuatorStaticDat...
method SetActuatorStaticDataCollection (line 20) | public void SetActuatorStaticDataCollection(ActuatorStaticDataCollecti...
method SetActuatorStaticData (line 25) | public bool SetActuatorStaticData(string key, string value)
FILE: FiddlerHelper/FiddlerHttpFilter.cs
type FiddlerUriMatchMode (line 13) | public enum FiddlerUriMatchMode
class FiddlerUriMatch (line 23) | [Serializable]
method FiddlerUriMatch (line 32) | public FiddlerUriMatch()
method FiddlerUriMatch (line 37) | public FiddlerUriMatch(FiddlerUriMatchMode matchMode,string matchUri)
method Match (line 43) | public bool Match(string matchString)
method Equals (line 63) | public bool Equals(FiddlerUriMatch targetUriMatch)
method Equals (line 67) | public new bool Equals(object targetFiddlerHttpTamper)
method ToString (line 77) | public new string ToString()
class FiddlerHeadMatch (line 83) | [Serializable]
method FiddlerHeadMatch (line 90) | public FiddlerHeadMatch()
method FiddlerHeadMatch (line 95) | public FiddlerHeadMatch(List<MyKeyValuePair<string, string>> headsFilter)
method AddHeadMatch (line 100) | public void AddHeadMatch(MyKeyValuePair<string, string> yourHeadMatch)
method Match (line 109) | public bool Match(HTTPHeaders matchHeaders)
method Equals (line 124) | public bool Equals(FiddlerHeadMatch yourFiddlerHeadMatch)
method ToString (line 148) | public new string ToString()
class FiddlerBodyMatch (line 167) | [Serializable]
method Match (line 179) | public new bool Match(string matchString)
method FiddlerBodyMatch (line 188) | public FiddlerBodyMatch() : base()
method FiddlerBodyMatch (line 190) | public FiddlerBodyMatch(FiddlerUriMatchMode matchMode, string matchDat...
method GetFiddlerBodyMatch (line 217) | public static FiddlerBodyMatch GetFiddlerBodyMatch(FiddlerUriMatchMode...
method Match (line 223) | public bool Match(Byte[] matchBytes)
class FiddlerHttpFilter (line 252) | [Serializable]
method FiddlerHttpFilter (line 265) | public FiddlerHttpFilter()
method FiddlerHttpFilter (line 270) | public FiddlerHttpFilter(FiddlerUriMatch uriMatch)
method Match (line 274) | public bool Match(Session oSession, bool isRequest, WebSocketMessage w...
method Equals (line 356) | public bool Equals(FiddlerHttpFilter yourFiddlerHttpFilter)
method Equals (line 390) | public new bool Equals(object targetFiddlerHttpFilter)
method GetShowTitle (line 400) | public string GetShowTitle()
method ToString (line 413) | public new string ToString()
FILE: FiddlerHelper/FiddlerModificHttpRuleCollection.cs
class FiddlerModificHttpRuleCollection (line 10) | [Serializable]
method FiddlerModificHttpRuleCollection (line 20) | public FiddlerModificHttpRuleCollection() // Serializable 需要空参数的构造函数
method FiddlerModificHttpRuleCollection (line 26) | public FiddlerModificHttpRuleCollection(List<FiddlerRequestChange> you...
FILE: FiddlerHelper/FiddlerModificSettingInfo.cs
class FiddlerModificSettingInfo (line 9) | [Serializable]
method FiddlerModificSettingInfo (line 60) | public FiddlerModificSettingInfo():this(true, false ,true,true)
method FiddlerModificSettingInfo (line 64) | public FiddlerModificSettingInfo( bool isSkipTlsHandshake, bool isOnly...
FILE: FiddlerHelper/FiddlerRequsetChange.cs
class FiddlerRequestChange (line 14) | [Serializable]
method SetHasParameter (line 75) | public void SetHasParameter(bool hasParameter , ActuatorStaticDataColl...
method Clone (line 103) | public object Clone()
FILE: FiddlerHelper/FiddlerResponseChange.cs
class FiddlerResponseChange (line 14) | [Serializable]
method SetHasParameter (line 72) | public void SetHasParameter(bool hasParameter, ActuatorStaticDataColle...
method Clone (line 96) | public object Clone()
FILE: FiddlerHelper/FiddlerRuleGroup.cs
class FiddlerRuleGroup (line 13) | [Serializable]
method FiddlerRuleGroup (line 31) | public FiddlerRuleGroup(ListView rqLv,ListView rpLv)
method SetRuleGroupListView (line 46) | public void SetRuleGroupListView(ListView rqLv, ListView rpLv)
method ReflushListViewItem (line 56) | private void ReflushListViewItem(ListView listView)
method ReflushGroupDc (line 74) | public void ReflushGroupDc(ListView listView=null)
method ReArrangeGroup (line 130) | public void ReArrangeGroup(ListView listView = null)
method RemoveGroupTemporary (line 153) | public void RemoveGroupTemporary(ListView listView)
method RecoverTemporaryGroup (line 194) | public void RecoverTemporaryGroup(ListView listView ,bool isCheckStatu...
method RecoverGroup (line 281) | public void RecoverGroup()
FILE: FiddlerHelper/FiddlerSessionHelper.cs
class FiddlerSessionHelper (line 10) | class FiddlerSessionHelper
method FindMatchTanperRule (line 21) | public static List<IFiddlerHttpTamper> FindMatchTanperRule<T>(Session ...
FILE: FiddlerHelper/IFiddlerHttpTamper.cs
type IFiddlerHttpTamper (line 10) | public interface IFiddlerHttpTamper:ICloneable
FILE: FiddlerHelper/TamperProtocalType.cs
type TamperProtocalType (line 4) | public enum TamperProtocalType
FILE: FiddlerHelper/VersionControl/FiddlerModificHttpRuleCollectionV1.cs
class FiddlerModificHttpRuleCollection (line 11) | [Serializable]
method FiddlerModificHttpRuleCollection (line 22) | public FiddlerModificHttpRuleCollection() // Serializable 需要空参数的构造函数
method FiddlerModificHttpRuleCollection (line 28) | public FiddlerModificHttpRuleCollection(List<FiddlerRequsetChange> you...
class FiddlerRequsetChange (line 87) | [Serializable]
method GetBase (line 91) | public FiddlerRequestChange GetBase()
FILE: FiddlerSessionTamper.cs
class FiddlerSessionTamper (line 16) | public class FiddlerSessionTamper
method ModificSessionRequest (line 23) | public static void ModificSessionRequest(Session oSession, FiddlerRequ...
method ReplaceSessionRequest (line 149) | public static void ReplaceSessionRequest(Session oSession, FiddlerRequ...
method ModificSessionResponse (line 214) | public static void ModificSessionResponse(Session oSession, FiddlerRes...
method ReplaceSessionResponse (line 333) | public static void ReplaceSessionResponse(Session oSession, FiddlerRes...
method ModificWebSocketMessage (line 396) | public static void ModificWebSocketMessage(Session oSession, WebSocket...
method PickSessionParameter (line 480) | public static void PickSessionParameter(Session oSession, IFiddlerHttp...
method GetSessionRawData (line 589) | public static string GetSessionRawData(Session oSession, bool isHaveRe...
method GetSessionData (line 621) | public static bool GetSessionData(Session oSession, FreeHttpControl.Fr...
FILE: FreeHttpControl/ChangeEncodeForm.Designer.cs
class ChangeEncodeForm (line 3) | partial class ChangeEncodeForm
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/ChangeEncodeForm.cs
class ChangeEncodeForm (line 13) | public partial class ChangeEncodeForm : Form
class ChangeEncodeInfo (line 15) | public class ChangeEncodeInfo
method ChangeEncodeForm (line 26) | public ChangeEncodeForm(ChangeEncodeInfo info)
method ChangeEncodeForm_Load (line 40) | private void ChangeEncodeForm_Load(object sender, EventArgs e)
method Tb_recode_TextChanged (line 58) | private void Tb_recode_TextChanged(object sender, EventArgs e)
method UpdataContentType (line 62) | private void UpdataContentType()
method bt_ok_Click (line 91) | private void bt_ok_Click(object sender, EventArgs e)
FILE: FreeHttpControl/ControlHelper/LoadBitmap.cs
class LoadBitmap (line 13) | class LoadBitmap
method LoadBitmap (line 24) | public LoadBitmap(Size size)
method SetSize (line 30) | internal void SetSize(int size)
method SetSize (line 34) | public void SetSize(Size size)
method DrawCircle (line 40) | public Bitmap DrawCircle(int j)
FILE: FreeHttpControl/ControlHelper/LoadWindowService.cs
class LoadWindowService (line 10) | public class LoadWindowService
method LoadWindowService (line 20) | public LoadWindowService()
method Timer_Elapsed (line 28) | private void Timer_Elapsed(object sender, System.Timers.ElapsedEventAr...
method Timer_Tick (line 33) | private void Timer_Tick(object sender, EventArgs e)
method StartLoad (line 44) | public void StartLoad(Form form,bool isAsync = false)
method StopLoad (line 65) | public void StopLoad()
FILE: FreeHttpControl/ControlHelper/MarkControlService.cs
class MarkControlService (line 11) | public class MarkControlService:IDisposable
class RemindControlInfo (line 16) | class RemindControlInfo
method RemindControlInfo (line 21) | public RemindControlInfo(int yourRemindTime, Color yourOriginColor)
method MarkControlService (line 32) | public MarkControlService(int clickTime)
method myTimer_Tick (line 41) | void myTimer_Tick(object sender, EventArgs e)
method MarkControl (line 97) | public void MarkControl(Control yourControl, Color yourColor, int your...
method MarkControl (line 122) | public void MarkControl(ListViewItem yourItem, Color yourColor, int yo...
method SetColor (line 147) | public void SetColor(Control yourControl, Color yourColor)
method SetColor (line 159) | public void SetColor(ListViewItem yourItem, Color yourColor)
method Dispose (line 171) | public void Dispose()
FILE: FreeHttpControl/ControlHelper/MyControlHelper.cs
class MyControlHelper (line 13) | public class MyControlHelper
method SetControlFreeze (line 21) | public static void SetControlFreeze(System.Windows.Forms.Control yourCtr)
method SetControlUnfreeze (line 30) | public static void SetControlUnfreeze(System.Windows.Forms.Control you...
method SetRichTextBoxDropString (line 41) | public static void SetRichTextBoxDropString(System.Windows.Forms.TextB...
method SetRichTextBoxDropString (line 86) | public static void SetRichTextBoxDropString(System.Windows.Forms.RichT...
method Rtb_DragEnter (line 97) | private static void Rtb_DragEnter(object sender, System.Windows.Forms....
method Rtb_DragDrop (line 105) | private static void Rtb_DragDrop(object sender, System.Windows.Forms.D...
class UnsafeNativeMethods (line 120) | [System.Security.SuppressUnmanagedCodeSecurity]
method SendMessage (line 123) | [System.Runtime.InteropServices.DllImport("user32")]
class MyExtensionMethods (line 128) | public static class MyExtensionMethods
method GetLatency (line 130) | public static int GetLatency(this System.Windows.Forms.LinkLabel llb)
method SetLatency (line 146) | public static void SetLatency(this System.Windows.Forms.LinkLabel llb,...
method AddRtbStr (line 165) | public static void AddRtbStr(this RichTextBox rtb, string strInput, Co...
FILE: FreeHttpControl/EditCookieForm.Designer.cs
class EditCookieForm (line 3) | partial class EditCookieForm
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/EditCookieForm.cs
class EditCookieForm (line 13) | public partial class EditCookieForm : Form
method EditCookieForm (line 17) | public EditCookieForm(ListView yourEditListView)
method EditCookieForm (line 26) | public EditCookieForm(ListView yourEditListView , string name, string ...
method EditCookieForm_Load (line 34) | private void EditCookieForm_Load(object sender, EventArgs e)
method tb_attribute_TextChanged (line 43) | private void tb_attribute_TextChanged(object sender, EventArgs e)
method bt_ok_Click (line 48) | private void bt_ok_Click(object sender, EventArgs e)
method UpdataSetText (line 61) | private void UpdataSetText()
FILE: FreeHttpControl/EditKeyVaule.Designer.cs
class EditKeyVaule (line 3) | partial class EditKeyVaule
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/EditKeyVaule.cs
class EditKeyVaule (line 13) | public partial class EditKeyVaule : Form
method EditKeyVaule (line 19) | public EditKeyVaule(ListView yourEditListView , bool yourIsAdd ,string...
method EditKeyVaule (line 27) | public EditKeyVaule(ListView yourEditListView, string yourHeadKey,stri...
method EditKeyVaule (line 34) | public EditKeyVaule(ListView yourEditListView, bool yourIsAdd, bool yo...
method EditKeyVaule_Load (line 40) | private void EditKeyVaule_Load(object sender, EventArgs e)
method bt_ok_Click (line 55) | private void bt_ok_Click(object sender, EventArgs e)
FILE: FreeHttpControl/EditParameterPickWindow.Designer.cs
class EditParameterPickWindow (line 3) | partial class EditParameterPickWindow
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/EditParameterPickWindow.cs
class EditParameterPickWindow (line 15) | public partial class EditParameterPickWindow : Form
method EditParameterPickWindow (line 17) | public EditParameterPickWindow()
method EditParameterPickWindow (line 28) | public EditParameterPickWindow(List<ParameterPick> parameterPicklist, ...
method EditParameterPickWindow_Load (line 45) | private void EditParameterPickWindow_Load(object sender, EventArgs e)
method AddParameterPickBox (line 50) | private void AddParameterPickBox(ParameterPick yourParameterPick)
method AddAddParameterPickBox (line 67) | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerSer...
method ResizeParameterPickBoxList (line 82) | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerSer...
method AddParameterPickBox_OnAddParameterClick (line 95) | void AddParameterPickBox_OnAddParameterClick(object sender, AddParamet...
method pb_add_Click (line 130) | private void pb_add_Click(object sender, EventArgs e)
method bt_ok_Click (line 136) | private void bt_ok_Click(object sender, EventArgs e)
FILE: FreeHttpControl/EditSheetForm.Designer.cs
class EditSheetForm (line 3) | partial class EditSheetForm
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/EditSheetForm.cs
class EditSheetForm (line 14) | public partial class EditSheetForm : Form
class SaveSheetDataEventArgs (line 16) | public class SaveSheetDataEventArgs : EventArgs
method SaveSheetDataEventArgs (line 20) | public SaveSheetDataEventArgs(List<List<string>> sheetData, Point? s...
method EditSheetForm (line 27) | public EditSheetForm()
method EditSheetForm (line 36) | public EditSheetForm(string name, List<List<string>> dataSource, Point...
method EditSheetForm_Load (line 43) | private void EditSheetForm_Load(object sender, EventArgs e)
method dataGridView_RowsAdded (line 59) | private void dataGridView_RowsAdded(object sender, DataGridViewRowsAdd...
method dataGridView_RowsRemoved (line 68) | private void dataGridView_RowsRemoved(object sender, DataGridViewRowsR...
method pictureBox_MouseMove (line 78) | public void pictureBox_MouseMove(object sender, MouseEventArgs e)
method pictureBox_MouseLeave (line 84) | public void pictureBox_MouseLeave(object sender, EventArgs e)
method pb_saveSheet_Click (line 89) | private void pb_saveSheet_Click(object sender, EventArgs e)
method EditSheetForm_FormClosing (line 99) | private void EditSheetForm_FormClosing(object sender, FormClosingEvent...
method pb_export_Click (line 104) | private void pb_export_Click(object sender, EventArgs e)
method FillData (line 121) | private DataTable FillData(List<List<string>> sourceData)
method GetData (line 153) | private List<List<string>> GetData()
method IsDataSourceEqual (line 172) | private bool IsDataSourceEqual(List<List<string>> yourDataSource)
FILE: FreeHttpControl/FreeHttpWindow.Designer.cs
class FreeHttpWindow (line 5) | partial class FreeHttpWindow
method Dispose (line 16) | protected override void Dispose(bool disposing)
method InitializeComponent (line 31) | private void InitializeComponent()
FILE: FreeHttpControl/FreeHttpWindow.cs
class FreeHttpWindow (line 36) | public partial class FreeHttpWindow : UserControl
type RuleEditMode (line 41) | public enum RuleEditMode
type GetSessionAction (line 47) | public enum GetSessionAction
class GetSessionRawDataEventArgs (line 54) | public class GetSessionRawDataEventArgs : EventArgs
method GetSessionRawDataEventArgs (line 57) | public GetSessionRawDataEventArgs(GetSessionAction sessionAction)
class GetSessionEventArgs (line 63) | public class GetSessionEventArgs
method GetSessionEventArgs (line 72) | public GetSessionEventArgs(bool isGetEntity)
class GetSessionSeekHeadEventArgs (line 78) | public class GetSessionSeekHeadEventArgs : EventArgs
method GetSessionSeekHeadEventArgs (line 84) | public GetSessionSeekHeadEventArgs(KeyValuePair<string, string> resq...
method FreeHttpWindow (line 101) | public FreeHttpWindow()
method MyInitializeComponent (line 110) | private void MyInitializeComponent()
method InitializeConfigInfo (line 125) | private void InitializeConfigInfo(FiddlerModificHttpRuleCollection you...
method FreeHttpWindow (line 164) | public FreeHttpWindow(FiddlerModificHttpRuleCollection yourRuleCollect...
method FreeHttpWindow_Load (line 281) | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerSer...
method FreeHttpWindowSelectedChanged (line 384) | internal void FreeHttpWindowSelectedChanged(bool isInFreeHttpWindowSel...
method FreeHttpWindowParentChanged (line 405) | internal void FreeHttpWindowParentChanged(object sender)
method tabControl_Modific_Selecting (line 422) | private void tabControl_Modific_Selecting(object sender, TabControlCan...
method addFileToolStripMenuItem_Click (line 476) | private void addFileToolStripMenuItem_Click(object sender, EventArgs e)
method contextMenuStrip_addParameter_Opening (line 524) | private void contextMenuStrip_addParameter_Opening(object sender, Canc...
method contextMenuStrip_AddFile_Opening (line 529) | private void contextMenuStrip_AddFile_Opening(object sender, CancelEve...
method addParameterDataToolStripMenuItem_Click (line 546) | private void addParameterDataToolStripMenuItem_Click(object sender, Ev...
method addParameterDataToolStripMenuItem_DropDownOpening (line 588) | private void addParameterDataToolStripMenuItem_DropDownOpening(object ...
method antoContentLengthToolStripMenuItem_Click (line 645) | private void antoContentLengthToolStripMenuItem_Click(object sender, E...
method pictureBox_editRuleMode_Click (line 650) | private void pictureBox_editRuleMode_Click(object sender, EventArgs e)
method pictureBox_editHttpFilter_Click (line 654) | private void pictureBox_editHttpFilter_Click(object sender, EventArgs e)
method pictureBox_MouseMove (line 674) | public void pictureBox_MouseMove(object sender, MouseEventArgs e)
method pictureBox_MouseLeave (line 680) | public void pictureBox_MouseLeave(object sender, EventArgs e)
method tb_Modific_body_Enter (line 686) | private void tb_Modific_body_Enter(object sender, EventArgs e)
method tb_Modific_body_Leave (line 708) | private void tb_Modific_body_Leave(object sender, EventArgs e)
method tbe_BodyModific_OnCloseEditBox (line 735) | void tbe_BodyModific_OnCloseEditBox(object sender, TextBoxEditer.Close...
method tabControl_Modific_Resize (line 740) | private void tabControl_Modific_Resize(object sender, EventArgs e)
method splitContainer_httpControl_Resize (line 762) | private void splitContainer_httpControl_Resize(object sender, EventArg...
method pb_ruleComfrim_Click (line 773) | private void pb_ruleComfrim_Click(object sender, EventArgs e)
method pb_ruleCancel_Click (line 910) | private void pb_ruleCancel_Click(object sender, EventArgs e)
method pb_protocolSwitch_Click (line 916) | private void pb_protocolSwitch_Click(object sender, EventArgs e)
method pb_responseLatency_Click (line 926) | private void pb_responseLatency_Click(object sender, EventArgs e)
method pb_pickRule_Click (line 940) | private void pb_pickRule_Click(object sender, EventArgs e)
method f_OnSetValue (line 955) | void f_OnSetValue(object sender, SetVaule.SetVauleEventArgs e)
method disableCacheToolStripMenuItem_Click (line 968) | private void disableCacheToolStripMenuItem_Click(object sender, EventA...
method addCookieToolStripMenuItem_Click (line 1003) | private void addCookieToolStripMenuItem_Click(object sender, EventArgs e)
method addUserAgentToolStripMenuItem_Click (line 1021) | private void addUserAgentToolStripMenuItem_Click(object sender, EventA...
method ChangeSessionEncodingToolStripMenuItem_Click (line 1039) | private void ChangeSessionEncodingToolStripMenuItem_Click(object sende...
method deleteCookieToolStripMenuItem_Click (line 1079) | private void deleteCookieToolStripMenuItem_Click(object sender, EventA...
method setClientCookieToolStripMenuItem_Click (line 1119) | private void setClientCookieToolStripMenuItem_Click(object sender, Eve...
method copySessionCookiesToolStripMenuItem_Click (line 1137) | private void copySessionCookiesToolStripMenuItem_Click(object sender, ...
method removeSessionCookiesToolStripMenuItem_Click (line 1158) | private void removeSessionCookiesToolStripMenuItem_Click(object sender...
method showSelectedSessionStreamToolStripMenuItem_Click (line 1177) | private void showSelectedSessionStreamToolStripMenuItem_Click(object s...
method httpTamperSettingToolStripMenuItem_Click (line 1185) | private void httpTamperSettingToolStripMenuItem_Click(object sender, E...
method loadingRemoteRuleToolStripMenuItem_Click (line 1190) | private void loadingRemoteRuleToolStripMenuItem_Click(object sender, E...
method parameterDataManageToolStripMenuItem_Click (line 1225) | private void parameterDataManageToolStripMenuItem_Click(object sender,...
method independentWindowToolStripMenuItem_Click (line 1243) | public void independentWindowToolStripMenuItem_Click(object sender, Ev...
method FeedbackToolStripMenuItem_Click (line 1257) | private void FeedbackToolStripMenuItem_Click(object sender, EventArgs e)
method CodeInGithubToolStripMenuItem_Click (line 1264) | private void CodeInGithubToolStripMenuItem_Click(object sender, EventA...
method DocumentationToolStripMenuItem_Click (line 1269) | private void DocumentationToolStripMenuItem_Click(object sender, Event...
method Lv_ruleList_OnItemDragSort (line 1278) | private void Lv_ruleList_OnItemDragSort(object sender, DragEventArgs e)
method Lv_ruleList_OnItemDragSortStart (line 1284) | private void Lv_ruleList_OnItemDragSortStart(object sender, ItemDragEv...
method pb_requestRuleSwitch_Click (line 1289) | private void pb_requestRuleSwitch_Click(object sender, EventArgs e)
method pb_responseRuleSwitch_Click (line 1305) | private void pb_responseRuleSwitch_Click(object sender, EventArgs e)
method lv_ruleList_ItemMouseHover (line 1322) | private void lv_ruleList_ItemMouseHover(object sender, ListViewItemMou...
method lv_ruleList_MouseLeave (line 1333) | private void lv_ruleList_MouseLeave(object sender, EventArgs e)
method ShowRuleInfo_pb_Click (line 1345) | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerSer...
method lv_RuleList_DoubleClick (line 1397) | private void lv_RuleList_DoubleClick(object sender, EventArgs e)
method lv_RuleList_ItemChecked (line 1443) | private void lv_RuleList_ItemChecked(object sender, ItemCheckedEventAr...
method pb_addTemperRule_Click (line 1452) | private void pb_addTemperRule_Click(object sender, EventArgs e)
method pb_removeTemperRule_Click (line 1474) | private void pb_removeTemperRule_Click(object sender, EventArgs e)
method GetRuleToolStripMenuItemSourceControl (line 1515) | private ListView GetRuleToolStripMenuItemSourceControl(object sender)
method removeSelectedRuleToolStripMenuItem_Click (line 1531) | private void removeSelectedRuleToolStripMenuItem_Click(object sender, ...
method removeAllRuleToolStripMenuItem_Click (line 1549) | private void removeAllRuleToolStripMenuItem_Click(object sender, Event...
method copySelectedRuleToolStripMenuItem_Click (line 1565) | private void copySelectedRuleToolStripMenuItem_Click(object sender, Ev...
method enableThisRuleToolStripMenuItem_Click (line 1593) | private void enableThisRuleToolStripMenuItem_Click(object sender, Even...
method enableAllRuleToolStripMenuItem_Click (line 1605) | private void enableAllRuleToolStripMenuItem_Click(object sender, Event...
method unableAllRuleToolStripMenuItem_Click (line 1615) | private void unableAllRuleToolStripMenuItem_Click(object sender, Event...
method editThisRuleToolStripMenuItem_Click (line 1625) | private void editThisRuleToolStripMenuItem_Click(object sender, EventA...
method RemoveEmptyViewGroup (line 1643) | private void RemoveEmptyViewGroup(ListView yourListView)
method MoveRuleItemGroup (line 1664) | private bool MoveRuleItemGroup(ListView.SelectedListViewItemCollection...
method IsAllDefaultViewGroup (line 1684) | private bool IsAllDefaultViewGroup(ListView.SelectedListViewItemCollec...
method FindOnlyOneViewGroup (line 1701) | private ListViewGroup FindOnlyOneViewGroup(ListView.SelectedListViewIt...
method groupToolStripMenuItem_DropDownOpened (line 1730) | private void groupToolStripMenuItem_DropDownOpened(object sender, Even...
method moveToGroupToolStripMenuItem_DropDownOpening (line 1796) | private void moveToGroupToolStripMenuItem_DropDownOpening(object sende...
method addToNewGroupToolStripMenuItem_Click (line 1807) | private void addToNewGroupToolStripMenuItem_Click(object sender, Event...
method renameThisGroupToolStripMenuItem_Click (line 1869) | private void renameThisGroupToolStripMenuItem_Click(object sender, Eve...
method deleteThisGroupToolStripMenuItem_Click (line 1908) | private void deleteThisGroupToolStripMenuItem_Click(object sender, Eve...
method enableThisGroupToolStripMenuItem_Click (line 1933) | private void enableThisGroupToolStripMenuItem_Click(object sender, Eve...
method unableThisGroupToolStripMenuItem_Click (line 1946) | private void unableThisGroupToolStripMenuItem_Click(object sender, Eve...
method pb_getSession_Click (line 1962) | private void pb_getSession_Click(object sender, EventArgs e)
method cb_macthMode_SelectedIndexChanged (line 1970) | private void cb_macthMode_SelectedIndexChanged(object sender, EventArg...
method tb_urlFilter_DragEnter (line 1983) | private void tb_urlFilter_DragEnter(object sender, DragEventArgs e)
method tb_urlFilter_DragDrop (line 1989) | private void tb_urlFilter_DragDrop(object sender, DragEventArgs e)
method rtb_MesInfo_DragEnter (line 1998) | void rtb_MesInfo_DragEnter(object sender, DragEventArgs e)
method rtb_MesInfo_DragDrop (line 2003) | void rtb_MesInfo_DragDrop(object sender, DragEventArgs e)
method pb_requestReplace_changeMode_Click (line 2024) | private void pb_requestReplace_changeMode_Click(object sender, EventAr...
FILE: FreeHttpControl/FreeHttpWindowFunction.cs
class FreeHttpWindow (line 37) | public partial class FreeHttpWindow : UserControl
method LoadFiddlerModificHttpRuleCollection (line 44) | private void LoadFiddlerModificHttpRuleCollection(FiddlerModificHttpRu...
method RefreshFiddlerRuleList (line 74) | private void RefreshFiddlerRuleList(ListView yourRuleListView)
method RefreshFiddlerRequestChangeList (line 105) | private void RefreshFiddlerRequestChangeList()
method RefreshFiddlerResponseChangeList (line 142) | private void RefreshFiddlerResponseChangeList()
method DelRuleFromListView (line 177) | private void DelRuleFromListView(ListView yourListViews,ListViewItem y...
method AddRuleToListView (line 190) | private void AddRuleToListView(ListView yourListViews, IFiddlerHttpTam...
method UpdataRuleToListView (line 214) | private void UpdataRuleToListView(ListViewItem yourListViewItem, IFidd...
method SyncEnableSateToIFiddlerHttpTamper (line 229) | private void SyncEnableSateToIFiddlerHttpTamper(ListViewItem yourListV...
method ChangeNowRuleMode (line 242) | private void ChangeNowRuleMode(RuleEditMode editMode,TamperProtocalTyp...
method ChangeProtocalRuleMode (line 302) | private void ChangeProtocalRuleMode(TamperProtocalType protocolMode)
method MarkControl (line 358) | private static void MarkControl(Control yourControl, Color yourColor, ...
method MarkRuleItem (line 363) | private static void MarkRuleItem(ListViewItem yourItem, Color yourColo...
method MarkRuleItem (line 368) | public static void MarkRuleItem(ListViewItem yourItem)
method MarkMatchRule (line 373) | public static void MarkMatchRule(ListViewItem yourItem)
method MarkTipControl (line 378) | public static void MarkTipControl(Control yourControl)
method MarkWarnControl (line 383) | public static void MarkWarnControl(Control yourControl)
method FindListViewItemFromRule (line 388) | public ListViewItem FindListViewItemFromRule(IFiddlerHttpTamper yourRule)
method MarkRuleInEdit (line 424) | private void MarkRuleInEdit(ListViewItem yourItem)
method MarkRuleOutEdit (line 430) | private void MarkRuleOutEdit(ListViewItem yourItem)
method GetUriMatch (line 436) | private FiddlerUriMatch GetUriMatch()
method GetHttpFilter (line 450) | private FiddlerHttpFilter GetHttpFilter()
method GetResponseLatency (line 468) | private int GetResponseLatency()
method GetParameterPick (line 473) | private List<ParameterPick> GetParameterPick()
method SetUriMatch (line 482) | private void SetUriMatch(FiddlerUriMatch fiddlerUriMatch)
method SetHttpMatch (line 491) | private void SetHttpMatch(FiddlerHttpFilter fiddlerHttpFilter)
method SetHttpParameterPick (line 508) | private void SetHttpParameterPick(List<ParameterPick> yourParameterPic...
method ChangeSetResponseLatencyMode (line 521) | private void ChangeSetResponseLatencyMode(int yourLatency)
method SetResponseLatency (line 556) | private void SetResponseLatency(int yourLatency)
method GetRequestModificInfo (line 560) | private FiddlerRequestChange GetRequestModificInfo()
method GetRequestReplaceInfo (line 590) | private FiddlerRequestChange GetRequestReplaceInfo()
method GetResponseModificInfo (line 672) | private FiddlerResponseChange GetResponseModificInfo()
method GetResponseReplaceInfo (line 703) | private FiddlerResponseChange GetResponseReplaceInfo()
method ClearModificInfo (line 717) | private void ClearModificInfo()
method SetRequestModificInfo (line 744) | private void SetRequestModificInfo(FiddlerRequestChange fiddlerRequset...
method SetResponseModificInfo (line 848) | private void SetResponseModificInfo(FiddlerResponseChange fiddlerRespo...
method AdjustRuleListViewIndex (line 893) | private void AdjustRuleListViewIndex(ListView ruleListView)
method GetNowHttpSession (line 904) | private GetSessionEventArgs GetNowHttpSession(bool isNeedBody = false)
method ReplaceRuleStorage (line 918) | public void ReplaceRuleStorage(RuleDetails ruleDetails)
method MergeRuleStorage (line 956) | public void MergeRuleStorage(RuleDetails ruleDetails)
method CloseEditRtb (line 1084) | public void CloseEditRtb()
method SetModificSession (line 1093) | public void SetModificSession(Fiddler.Session session)
method SetClientCookies (line 1168) | private void SetClientCookies(string yourCookieString, Func<KeyValuePa...
method SetClientAddCookies (line 1218) | public void SetClientAddCookies(string yourCookieString)
method SetClientDelCookies (line 1227) | public void SetClientDelCookies(string yourCookieString)
method ShowOwnerWindow (line 1243) | public void ShowOwnerWindow(string name,string info)
method PutInfo (line 1251) | public void PutInfo(string info)
method PutWarn (line 1260) | public void PutWarn(string info)
method PutError (line 1269) | public void PutError(string info)
FILE: FreeHttpControl/GetRemoteRuleWindow.Designer.cs
class GetRemoteRuleWindow (line 4) | partial class GetRemoteRuleWindow
method Dispose (line 15) | protected override void Dispose(bool disposing)
method InitializeComponent (line 30) | private void InitializeComponent()
FILE: FreeHttpControl/GetRemoteRuleWindow.cs
class GetRemoteRuleWindow (line 19) | public partial class GetRemoteRuleWindow : MyBaseInfoWindow
type ShowRuleCollectionType (line 21) | public enum ShowRuleCollectionType
method GetRemoteRuleWindow (line 42) | public GetRemoteRuleWindow(FreeHttpWindow freeHttpWindow , ShowRuleCol...
method GotoPrvateRule (line 52) | public void GotoPrvateRule(string ruleToken)
method SaveShareRule (line 65) | private void SaveShareRule()
method AddRuleToListView (line 118) | private void AddRuleToListView(ListView yourListViews, IFiddlerHttpTam...
method ClearRemoteRule (line 127) | private void ClearRemoteRule()
method GetRemoteRuleWindow_Load (line 138) | private void GetRemoteRuleWindow_Load(object sender, EventArgs e)
method ShowInfoChange (line 151) | private void ShowInfoChange(ShowRuleCollectionType showParameter)
method LoadShareRuleSummary (line 233) | private void LoadShareRuleSummary(ShareRuleSummary shareRuleSummary)
method LoadRules (line 262) | private void LoadRules(RuleDetails ruleDetails)
method GetRuleDetailsFromToken (line 281) | private RuleDetails GetRuleDetailsFromToken(string shareToken)
method lb_info_showType_Click (line 311) | private void lb_info_showType_Click(object sender, EventArgs e)
method bt_getRule_Click (line 319) | private void bt_getRule_Click(object sender, EventArgs e)
method ClearShowShareTakenItemBackColor (line 341) | private void ClearShowShareTakenItemBackColor()
method lv_shareRuleList_DoubleClick (line 349) | private void lv_shareRuleList_DoubleClick(object sender, EventArgs e)
method copyThisTokenToolStripMenuItem_Click (line 369) | private void copyThisTokenToolStripMenuItem_Click(object sender, Event...
method deleteThisTokenToolStripMenuItem_Click (line 378) | private async void deleteThisTokenToolStripMenuItem_Click(object sende...
method lv_remote_ruleList_MouseDoubleClick (line 405) | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerSer...
method GetRemoteRuleWindow_FormClosing (line 427) | private void GetRemoteRuleWindow_FormClosing(object sender, FormClosin...
method bt_merge_Click (line 435) | private void bt_merge_Click(object sender, EventArgs e)
method bt_replace_Click (line 470) | private void bt_replace_Click(object sender, EventArgs e)
method lb_info_MouseMove (line 496) | private void lb_info_MouseMove(object sender, MouseEventArgs e)
method lb_info_MouseLeave (line 501) | private void lb_info_MouseLeave(object sender, EventArgs e)
method pictureBox_MouseMove (line 513) | public void pictureBox_MouseMove(object sender, MouseEventArgs e)
method pictureBox_MouseLeave (line 519) | public void pictureBox_MouseLeave(object sender, EventArgs e)
FILE: FreeHttpControl/HttpFilterWindow.Designer.cs
class HttpFilterWindow (line 3) | partial class HttpFilterWindow
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/HttpFilterWindow.cs
class HttpFilterWindow (line 17) | public partial class HttpFilterWindow : Form
method HttpFilterWindow (line 19) | public HttpFilterWindow()
method HttpFilterWindow (line 26) | public HttpFilterWindow(object filter , TamperProtocalType mode = Tamp...
method HttpFilterWindow_Load (line 32) | private void HttpFilterWindow_Load(object sender, EventArgs e)
method bt_ok_Click (line 87) | private void bt_ok_Click(object sender, EventArgs e)
method cb_macthMode_SelectedIndexChanged (line 159) | private void cb_macthMode_SelectedIndexChanged(object sender, EventArg...
method tbe_urlFilter_OnCloseEditBox (line 173) | void tbe_urlFilter_OnCloseEditBox(object sender, TextBoxEditer.CloseEd...
method HttpFilterWindow_Deactivate (line 179) | private void HttpFilterWindow_Deactivate(object sender, EventArgs e)
method tb_urlFilter_Enter (line 185) | private void tb_urlFilter_Enter(object sender, EventArgs e)
method tb_urlFilter_Leave (line 190) | private void tb_urlFilter_Leave(object sender, EventArgs e)
FILE: FreeHttpControl/MyBaseInfoWindow.cs
class MyBaseInfoWindow (line 25) | public partial class MyBaseInfoWindow : Form
method InitializeComponent (line 27) | private void InitializeComponent()
method MyBaseInfoWindow (line 98) | public MyBaseInfoWindow()
method myCaseParameter_Load (line 145) | public void myCaseParameter_Load(object sender, EventArgs e)
method MyChildWindow_Resize (line 166) | void MyChildWindow_Resize(object sender, EventArgs e)
method myUpdataTime_Tick (line 172) | public void myUpdataTime_Tick(object sender, EventArgs e)
method VirtualUpdataTime_Tick (line 177) | public virtual void VirtualUpdataTime_Tick()
method pictureBox_close_Click (line 181) | private void pictureBox_close_Click(object sender, EventArgs e)
method pictureBox_hide_Click (line 186) | private void pictureBox_hide_Click(object sender, EventArgs e)
method pictureBox_MouseMove (line 192) | public void pictureBox_MouseMove(object sender, MouseEventArgs e)
method pictureBox_MouseLeave (line 198) | public void pictureBox_MouseLeave(object sender, EventArgs e)
method MyBaseInfoWindow_MouseDown (line 208) | private void MyBaseInfoWindow_MouseDown(object sender, MouseEventArgs e)
method MyBaseInfoWindow_MouseUp (line 218) | private void MyBaseInfoWindow_MouseUp(object sender, MouseEventArgs e)
method MyBaseInfoWindow_MouseMove (line 223) | private void MyBaseInfoWindow_MouseMove(object sender, MouseEventArgs e)
method MyBaseInfoWindow_FormClosing (line 235) | private void MyBaseInfoWindow_FormClosing(object sender, FormClosingEv...
FILE: FreeHttpControl/MyControl/AddParameterPickBox.Designer.cs
class AddParameterPickBox (line 3) | partial class AddParameterPickBox
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/MyControl/AddParameterPickBox.cs
class AddParameterPickBox (line 14) | public partial class AddParameterPickBox : UserControl
class AddParameterEventArgs (line 16) | public class AddParameterEventArgs:EventArgs
method AddParameterEventArgs (line 19) | public AddParameterEventArgs(bool isAdd)
method AddParameterPickBox (line 26) | public AddParameterPickBox()
method AddParameterPickBox (line 33) | public AddParameterPickBox(ParameterPick yourParameterPick)
method cb_ParameterType_SelectedIndexChanged (line 43) | private void cb_ParameterType_SelectedIndexChanged(object sender, Even...
method cb_ParameterTypeAddition_SelectedIndexChanged (line 62) | private void cb_ParameterTypeAddition_SelectedIndexChanged(object send...
method pictureBox_MouseMove (line 72) | public void pictureBox_MouseMove(object sender, MouseEventArgs e)
method pictureBox_MouseLeave (line 78) | public void pictureBox_MouseLeave(object sender, EventArgs e)
method AddParameterPickBox_Validating (line 83) | private void AddParameterPickBox_Validating(object sender, CancelEvent...
method AddParameterPickBox_Validated (line 107) | private void AddParameterPickBox_Validated(object sender, EventArgs e)
method pb_add_Click (line 112) | private void pb_add_Click(object sender, EventArgs e)
method pb_remove_Click (line 120) | private void pb_remove_Click(object sender, EventArgs e)
method GetFocus (line 129) | public void GetFocus()
method GetParameterPickInfo (line 135) | public ParameterPick GetParameterPickInfo()
FILE: FreeHttpControl/MyControl/CBalloonBase.cs
class CBalloonBase (line 14) | public class CBalloonBase : System.Windows.Forms.Form
type sdSide (line 17) | public enum sdSide
type alAlign (line 27) | public enum alAlign
method CBalloonBase (line 80) | public CBalloonBase()
method Dispose (line 96) | protected override void Dispose(bool disposing)
method InitializeComponent (line 113) | private void InitializeComponent()
method reSizeMe (line 141) | public void reSizeMe()
method bCalcTailPos (line 346) | private bool bCalcTailPos(Point ptA, bool bOnlyBelow)
method setBalloonPosition (line 415) | public void setBalloonPosition(Form onForm, Control onControl)
method setBalloonPosition (line 455) | public void setBalloonPosition(Form onForm, Point myPoint ,Size mySize)
method setBalloonPosition (line 494) | public void setBalloonPosition(Form onForm, Point atPoint)
method UpdateBalloonPosition (line 530) | public void UpdateBalloonPosition(Point atPoint)
method Parent_Move (line 545) | public void Parent_Move(object sender, System.EventArgs e)
method bMakeShadow (line 565) | private bool bMakeShadow()
method DestroyShadow (line 591) | private void DestroyShadow()
method reDrawMe (line 611) | public void reDrawMe()
method CBalloonBase_Paint (line 629) | [STAThread]
method CBalloonBase_Click (line 640) | private void CBalloonBase_Click(object sender, System.EventArgs e)
method CBalloonBase_Resize (line 648) | private void CBalloonBase_Resize(object sender, System.EventArgs e)
method label1_Click (line 653) | private void label1_Click(object sender, System.EventArgs e)
method CBalloonBase_VisibleChanged (line 669) | private void CBalloonBase_VisibleChanged(object sender, System.EventAr...
method CBalloonBase_Closing (line 684) | private void CBalloonBase_Closing(object sender, System.ComponentModel...
method CBalloonBase_Move (line 714) | private void CBalloonBase_Move(object sender, System.EventArgs e)
FILE: FreeHttpControl/MyControl/EditListView.Designer.cs
class EditListView (line 3) | partial class EditListView
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/MyControl/EditListView.cs
class EditListView (line 13) | public partial class EditListView : UserControl
method EditListView (line 15) | public EditListView()
method EditListView_Load (line 46) | private void EditListView_Load(object sender, EventArgs e)
method pictureBox_MouseMove (line 57) | public void pictureBox_MouseMove(object sender, MouseEventArgs e)
method pictureBox_MouseLeave (line 63) | public void pictureBox_MouseLeave(object sender, EventArgs e)
method EditListView_Resize (line 68) | private void EditListView_Resize(object sender, EventArgs e)
method pictureBox_add_Click (line 73) | private void pictureBox_add_Click(object sender, EventArgs e)
method pictureBox_remove_Click (line 87) | private void pictureBox_remove_Click(object sender, EventArgs e)
method lv_dataList_DoubleClick (line 110) | private void lv_dataList_DoubleClick(object sender, EventArgs e)
FILE: FreeHttpControl/MyControl/ListViewExtended.cs
class ListViewExtended (line 11) | public class ListViewExtended : ListView
method SendMessage (line 39) | [DllImport("User32.dll"), Description("Sends the specified message to ...
method GetGroupID (line 42) | private static int? GetGroupID(ListViewGroup lstvwgrp)
method setGrpState (line 61) | private static void setGrpState(ListViewGroup lstvwgrp, ListViewGroupS...
method setGrpFooter (line 93) | private static void setGrpFooter(ListViewGroup lstvwgrp, string footer)
method SetGroupState (line 122) | public void SetGroupState(ListViewGroupState state)
method SetGroupState (line 128) | public void SetGroupState(ListViewGroupState state , ListViewGroup lvg)
method SetGroupFooter (line 133) | public void SetGroupFooter(ListViewGroup lvg, string footerText)
method WndProc (line 138) | protected override void WndProc(ref Message m)
type LVGROUP (line 185) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode), Descrip...
type ListViewGroupMask (line 338) | public enum ListViewGroupMask
type ListViewGroupState (line 357) | public enum ListViewGroupState
FILE: FreeHttpControl/MyControl/MyEnableSwitch.Designer.cs
class MyEnableSwitch (line 3) | partial class MyEnableSwitch
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/MyControl/MyEnableSwitch.cs
class MyEnableSwitch (line 13) | public partial class MyEnableSwitch : UserControl
class ChangeEnableEventArgs (line 16) | public class ChangeEnableEventArgs:EventArgs
method ChangeEnableEventArgs (line 19) | public ChangeEnableEventArgs(bool isEnable)
method MyEnableSwitch (line 27) | public MyEnableSwitch()
method pb_switch_Click (line 51) | private void pb_switch_Click(object sender, EventArgs e)
FILE: FreeHttpControl/MyControl/MyEnabledPictureButton.cs
class MyEnabledPictureButton (line 12) | class MyEnabledPictureButton : PictureBox
method MyEnabledPictureButton (line 14) | public MyEnabledPictureButton()
method OnMouseMove (line 62) | protected override void OnMouseMove(MouseEventArgs e)
method OnMouseLeave (line 67) | protected override void OnMouseLeave(EventArgs e)
method pictureBox_MouseMove (line 73) | public void pictureBox_MouseMove(object sender, MouseEventArgs e)
method pictureBox_MouseLeave (line 79) | public void pictureBox_MouseLeave(object sender, EventArgs e)
FILE: FreeHttpControl/MyControl/MyListView.cs
class MyListView (line 15) | public class MyListView : ListViewExtended
class GroupSelectedItemsSataus (line 20) | public class GroupSelectedItemsSataus
method GroupSelectedItemsSataus (line 25) | public GroupSelectedItemsSataus(ListView listView)
method GetSnapshoot (line 31) | public void GetSnapshoot()
method ReCoverSnapshoot (line 40) | public void ReCoverSnapshoot()
method MyListView (line 75) | public MyListView() : base()
method WndProc (line 93) | protected override void WndProc(ref Message m)
method InitializeComponent (line 107) | private void InitializeComponent()
method AppearAboveItem (line 127) | private bool AppearAboveItem(int nowIndex)
method MyListView_ItemDrag (line 141) | private void MyListView_ItemDrag(object sender, ItemDragEventArgs e)
method MyListView_DragDrop (line 158) | private void MyListView_DragDrop(object sender, DragEventArgs e)
method MyListView_DragEnter (line 185) | private void MyListView_DragEnter(object sender, DragEventArgs e)
method MyListView_DragLeave (line 194) | private void MyListView_DragLeave(object sender, EventArgs e)
method MyListView_DragOver (line 205) | private void MyListView_DragOver(object sender, DragEventArgs e)
FILE: FreeHttpControl/MyControl/MyPanel.cs
class MyPanel (line 9) | class MyPanel : System.Windows.Forms.Panel
method MyPanel (line 11) | public MyPanel()
FILE: FreeHttpControl/MyControl/MySwitchPictureButton.cs
class MySwitchPictureButton (line 12) | class MySwitchPictureButton : PictureBox
method MySwitchPictureButton (line 14) | public MySwitchPictureButton()
method OnClick (line 69) | protected override void OnClick(EventArgs e)
method OnMouseMove (line 82) | protected override void OnMouseMove(MouseEventArgs e)
method OnMouseLeave (line 87) | protected override void OnMouseLeave(EventArgs e)
method pictureBox_MouseMove (line 93) | public void pictureBox_MouseMove(object sender, MouseEventArgs e)
method pictureBox_MouseLeave (line 99) | public void pictureBox_MouseLeave(object sender, EventArgs e)
FILE: FreeHttpControl/MyControl/RawRequestEdit.Designer.cs
class RawRequestEdit (line 3) | partial class RawRequestEdit
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/MyControl/RawRequestEdit.cs
class RawRequestEdit (line 14) | public partial class RawRequestEdit : UserControl
method RawRequestEdit (line 16) | public RawRequestEdit()
method pictureBox_MouseMove (line 24) | public void pictureBox_MouseMove(object sender, MouseEventArgs e)
method pictureBox_MouseLeave (line 30) | public void pictureBox_MouseLeave(object sender, EventArgs e)
method SetText (line 35) | public void SetText(string mes)
method GetHttpRequest (line 40) | public HttpRequest GetHttpRequest()
method pictureBox_changeMode_Click (line 45) | private void pictureBox_changeMode_Click(object sender, EventArgs e)
FILE: FreeHttpControl/MyControl/RawResponseEdit.cs
class RawResponseEdit (line 15) | public partial class RawResponseEdit : UserControl
method RawResponseEdit (line 17) | public RawResponseEdit()
method RawResponseEdit_Load (line 51) | private void RawResponseEdit_Load(object sender, EventArgs e)
method rtb_rawResponse_DragDrop (line 65) | void rtb_rawResponse_DragDrop(object sender, DragEventArgs e)
method rtb_rawResponse_DragEnter (line 77) | void rtb_rawResponse_DragEnter(object sender, DragEventArgs e)
method initializeResponseLineDc (line 85) | private void initializeResponseLineDc(out Dictionary<string, string> rdc)
method RawResponseEdit_Resize (line 103) | private void RawResponseEdit_Resize(object sender, EventArgs e)
method cb_responseLine_SelectedIndexChanged (line 108) | private void cb_responseLine_SelectedIndexChanged(object sender, Event...
method contextMenuStrip_forRtbResponse_Opening (line 113) | private void contextMenuStrip_forRtbResponse_Opening(object sender, Ca...
method addFileToolStripMenuItem_Click (line 117) | private void addFileToolStripMenuItem_Click(object sender, EventArgs e)
method antoContentLengthToolStripMenuItem_Click (line 137) | private void antoContentLengthToolStripMenuItem_Click(object sender, E...
method useParameterDataToolStripMenuItem_Click (line 142) | private void useParameterDataToolStripMenuItem_Click(object sender, Ev...
method SetText (line 146) | public void SetText(string mes)
method ClearInfo (line 155) | public void ClearInfo()
method SetContextMenuStrip (line 166) | public bool SetContextMenuStrip(ContextMenuStrip yourContextMenuStrip)
method GetHttpResponse (line 184) | public ParameterHttpResponse GetHttpResponse(ActuatorStaticDataCollect...
FILE: FreeHttpControl/MyControl/RawResponseEdit.designer.cs
class RawResponseEdit (line 3) | partial class RawResponseEdit
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/MyControl/TextBoxEditer.Designer.cs
class TextBoxEditer (line 3) | partial class TextBoxEditer
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/MyControl/TextBoxEditer.cs
class TextBoxEditer (line 13) | public partial class TextBoxEditer : UserControl
class CloseEditBoxEventArgs (line 15) | public class CloseEditBoxEventArgs: EventArgs
method CloseEditBoxEventArgs (line 18) | public CloseEditBoxEventArgs(string editData)
method TextBoxEditer (line 24) | public TextBoxEditer()
method TextBoxEditer (line 34) | public TextBoxEditer(ContainerControl yourContainerControl): this()
method pictureBox_MouseMove (line 92) | public void pictureBox_MouseMove(object sender, MouseEventArgs e)
method pictureBox_MouseLeave (line 98) | public void pictureBox_MouseLeave(object sender, EventArgs e)
method pb_editTextBox_Click (line 103) | void pb_editTextBox_Click(object sender, EventArgs e)
method rtb_editTextBox_Leave (line 115) | void rtb_editTextBox_Leave(object sender, EventArgs e)
method editTextBox_Resize (line 120) | void editTextBox_Resize(object sender, EventArgs e)
method editTextBox_Move (line 128) | void editTextBox_Move(object sender, EventArgs e)
method CloseRichTextBox (line 139) | public void CloseRichTextBox()
method ShowRichTextBox (line 161) | public void ShowRichTextBox()
FILE: FreeHttpControl/MyControl/WatermakTextBox.cs
class WatermakTextBox (line 11) | class WatermakTextBox : System.Windows.Forms.TextBox
method SendMessage (line 18) | [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
method SetWatermark (line 32) | private void SetWatermark(string watermarkText)
FILE: FreeHttpControl/RemoveHead.Designer.cs
class RemoveHead (line 3) | partial class RemoveHead
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/RemoveHead.cs
class RemoveHead (line 13) | public partial class RemoveHead : Form
method RemoveHead (line 19) | public RemoveHead(ListView yourEditListView, bool yourIsAdd)
method RemoveHead (line 22) | public RemoveHead(ListView yourEditListView, bool yourIsAdd, bool your...
method RemoveHead_Load (line 30) | private void RemoveHead_Load(object sender, EventArgs e)
method bt_ok_Click (line 42) | private void bt_ok_Click(object sender, EventArgs e)
FILE: FreeHttpControl/RuleInfoWindow.cs
class RuleInfoWindow (line 13) | public partial class RuleInfoWindow : CBalloon.CBalloonBase
method RuleInfoWindow (line 16) | public RuleInfoWindow(ListViewItem yourListViewItem)
method LoadRuleInfo (line 33) | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerSer...
method MyCBalloon_Load (line 251) | private void MyCBalloon_Load(object sender, EventArgs e)
method Timer_Tick (line 268) | private void Timer_Tick(object sender, EventArgs e)
method pictureBox_close_Click (line 306) | private void pictureBox_close_Click(object sender, EventArgs e)
method pictureBox1_Click (line 312) | private void pictureBox1_Click(object sender, EventArgs e)
method RefreshRuleInfo (line 317) | public void RefreshRuleInfo()
method Close (line 330) | public new void Close()
method rtb_ruleInfo_ContentsResized (line 341) | private void rtb_ruleInfo_ContentsResized(object sender, ContentsResiz...
FILE: FreeHttpControl/RuleInfoWindow.designer.cs
class RuleInfoWindow (line 3) | partial class RuleInfoWindow
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/SaveShareRule.Designer.cs
class SaveShareRule (line 4) | partial class SaveShareRule
method Dispose (line 15) | protected override void Dispose(bool disposing)
method InitializeComponent (line 30) | private void InitializeComponent()
FILE: FreeHttpControl/SaveShareRule.cs
class SaveShareRule (line 8) | public partial class SaveShareRule : Form
method SaveShareRule (line 12) | public SaveShareRule(ShareRuleService ruleService)
method SaveShareRule_Load (line 19) | private void SaveShareRule_Load(object sender, EventArgs e)
method rb_newRule_CheckedChanged (line 28) | private void rb_newRule_CheckedChanged(object sender, EventArgs e)
method bt_save_Click (line 41) | private void bt_save_Click(object sender, EventArgs e)
FILE: FreeHttpControl/SetVaule.Designer.cs
class SetVaule (line 3) | partial class SetVaule
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/SetVaule.cs
class SetVaule (line 13) | public partial class SetVaule : Form
class SetVauleEventArgs (line 15) | public class SetVauleEventArgs:EventArgs
method SetVauleEventArgs (line 18) | public SetVauleEventArgs(string setValue)
method SetVaule (line 23) | public SetVaule()
method SetVaule (line 31) | public SetVaule(string formName, string remarkInfo, string nowValue, F...
method SetVaule_Load (line 40) | private void SetVaule_Load(object sender, EventArgs e)
method bt_ok_Click (line 47) | private void bt_ok_Click(object sender, EventArgs e)
FILE: FreeHttpControl/SettingWindow.Designer.cs
class SettingWindow (line 3) | partial class SettingWindow
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/SettingWindow.cs
class SettingWindow (line 16) | public partial class SettingWindow : Form
method SettingWindow (line 18) | public SettingWindow()
method SettingWindow (line 23) | public SettingWindow(FiddlerModificSettingInfo yourModifcSettingInfo):...
method SettingWindow_Load (line 30) | private void SettingWindow_Load(object sender, EventArgs e)
method myEnableSwitch_IsConnectTunnels_OnChangeEable (line 53) | void myEnableSwitch_IsConnectTunnels_OnChangeEable(object sender, MyEn...
method myEnableSwitch_IsDefaultEnableRule_OnChangeEable (line 58) | void myEnableSwitch_IsDefaultEnableRule_OnChangeEable(object sender, M...
method myEnableSwitch_IsOnlyMatchFistTamperRule_OnChangeEable (line 63) | void myEnableSwitch_IsOnlyMatchFistTamperRule_OnChangeEable(object sen...
method MyEnableSwitch_IsSyncTamperRule_OnChangeEnable (line 68) | private void MyEnableSwitch_IsSyncTamperRule_OnChangeEnable(object sen...
method MyEnableSwitch_IsHideSelfSession_OnChangeEnable (line 73) | private void MyEnableSwitch_IsHideSelfSession_OnChangeEnable(object se...
method myEnableSwitch_IsEnableHttpsService_OnChangeEnable (line 78) | void myEnableSwitch_IsEnableHttpsService_OnChangeEnable(object sender,...
FILE: FreeHttpControl/ShowSheetForm.Designer.cs
class ShowSheetForm (line 3) | partial class ShowSheetForm
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/ShowSheetForm.cs
class ShowSheetForm (line 13) | public partial class ShowSheetForm : Form
method ShowSheetForm (line 15) | public ShowSheetForm()
method ShowSheetForm (line 21) | public ShowSheetForm(string name, List<List<string>> dataSource)
method ShowSheetForm_Load (line 28) | private void ShowSheetForm_Load(object sender, EventArgs e)
FILE: FreeHttpControl/ShowTextForm.Designer.cs
class ShowTextForm (line 3) | partial class ShowTextForm
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/ShowTextForm.cs
class ShowTextForm (line 13) | public partial class ShowTextForm : Form
method ShowTextForm (line 15) | public ShowTextForm()
method ShowTextForm (line 20) | public ShowTextForm(string name,string textInfo):this()
method ShowTextForm_Load (line 26) | private void ShowTextForm_Load(object sender, EventArgs e)
FILE: FreeHttpControl/SortRule.Designer.cs
class SortRule (line 3) | partial class SortRule
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/SortRule.cs
class SortRule (line 13) | public partial class SortRule : Form
method SortRule (line 18) | public SortRule(MyListView listView)
method SortRule_Load (line 23) | private void SortRule_Load(object sender, EventArgs e)
FILE: FreeHttpControl/StaticDataAddWindow.Designer.cs
class StaticDataAddWindow (line 3) | partial class StaticDataAddWindow
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/StaticDataAddWindow.cs
class StaticDataAddWindow (line 14) | public partial class StaticDataAddWindow : MyBaseInfoWindow
method StaticDataAddWindow (line 16) | internal StaticDataAddWindow(ActuatorStaticDataCollection yourActuator...
method StaticDataAdd_Load (line 29) | private void StaticDataAdd_Load(object sender, EventArgs e)
method comboBox_CaseStaticDataClass_SelectedIndexChanged (line 50) | private void comboBox_CaseStaticDataClass_SelectedIndexChanged(object ...
method comboBox_CaseStaticDataType_SelectedIndexChanged (line 55) | private void comboBox_CaseStaticDataType_SelectedIndexChanged(object s...
method pb_confirm_Click (line 62) | private void pb_confirm_Click(object sender, EventArgs e)
FILE: FreeHttpControl/StaticDataManageWindow.Designer.cs
class StaticDataManageWindow (line 3) | partial class StaticDataManageWindow
method InitializeComponent (line 13) | private void InitializeComponent()
FILE: FreeHttpControl/StaticDataManageWindow.cs
class StaticDataManageWindow (line 14) | partial class StaticDataManageWindow : MyBaseInfoWindow
type ShowRunTimeParameterType (line 16) | public enum ShowRunTimeParameterType
method StaticDataManageWindow (line 23) | public StaticDataManageWindow(ActuatorStaticDataCollection yourActuato...
method VirtualUpdataTime_Tick (line 39) | public override void VirtualUpdataTime_Tick()
method StaticDataManageWindow_Load (line 45) | private void StaticDataManageWindow_Load(object sender, EventArgs e)
method StaticDataManageWindow_FormClosing (line 55) | private void StaticDataManageWindow_FormClosing(object sender, FormClo...
method actuatorStaticDataCollection_OnChangeCollection (line 64) | void actuatorStaticDataCollection_OnChangeCollection(object sender, Ac...
method lb_info_runTimeParameter_Click (line 69) | private void lb_info_runTimeParameter_Click(object sender, EventArgs e)
method listView_CaseParameter_SelectedIndexChanged (line 78) | private void listView_CaseParameter_SelectedIndexChanged(object sender...
method listView_CaseParameter_DoubleClick (line 86) | private void listView_CaseParameter_DoubleClick(object sender, EventAr...
method editSheetForm_SaveSheetData (line 103) | void editSheetForm_SaveSheetData(object sender, EditSheetForm.SaveShee...
method listView_CaseParameter_ItemDrag (line 131) | private void listView_CaseParameter_ItemDrag(object sender, ItemDragEv...
method pictureBox_controlData_Click (line 140) | private void pictureBox_controlData_Click(object sender, EventArgs e)
method pb_addStaticData_Click (line 171) | private void pb_addStaticData_Click(object sender, EventArgs e)
method pb_delStaticData_Click (line 177) | private void pb_delStaticData_Click(object sender, EventArgs e)
method lb_info_MouseMove (line 197) | private void lb_info_MouseMove(object sender, MouseEventArgs e)
method lb_info_MouseLeave (line 202) | private void lb_info_MouseLeave(object sender, EventArgs e)
method pictureBox_MouseMove (line 208) | public void pictureBox_MouseMove(object sender, MouseEventArgs e)
method pictureBox_MouseLeave (line 214) | public void pictureBox_MouseLeave(object sender, EventArgs e)
method ShowInfoChange (line 222) | private void ShowInfoChange(ShowRunTimeParameterType showParameter)
method EditItemChange (line 249) | private void EditItemChange(ListViewItem yourEidtItem)
method UpdatalistView_CaseParameter (line 288) | [MethodImplAttribute(MethodImplOptions.Synchronized)]
FILE: FreeHttpControl/UserFeedbackWindow.Designer.cs
class UserFeedbackWindow (line 3) | partial class UserFeedbackWindow
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: FreeHttpControl/UserFeedbackWindow.cs
class UserFeedbackWindow (line 14) | public partial class UserFeedbackWindow : Form
method UserFeedbackWindow (line 17) | public UserFeedbackWindow(FreeHttpWindow freeHttpWindow)
method Llb_gotoGitHub_LinkClicked (line 23) | private void Llb_gotoGitHub_LinkClicked(object sender, LinkLabelLinkCl...
method Bt_ok_Click (line 28) | private void Bt_ok_Click(object sender, EventArgs e)
FILE: HttpHelper/ContentModific.cs
type ContentModificMode (line 9) | public enum ContentModificMode
class ContentModific (line 19) | [Serializable]
method ContentModific (line 30) | public ContentModific()
method ContentModific (line 36) | public ContentModific(string targetKey,string replaceContent)
method GetFinalContent (line 104) | public string GetFinalContent(string sourceContent)
method GetFinalContent (line 138) | public byte[] GetFinalContent(byte[] sourceContent)
method GetRecodeContent (line 162) | public byte[] GetRecodeContent(string sourceContent)
method ToString (line 181) | public override string ToString()
FILE: HttpHelper/HttpRequest.cs
class HttpRequest (line 11) | [Serializable]
method HttpRequest (line 66) | public HttpRequest()
method SetRequestLine (line 72) | private void SetRequestLine(string yourRequestLine,bool isThrowExcepti...
method UpdataRequestLine (line 120) | private void UpdataRequestLine()
method ChangeRawData (line 128) | public void ChangeRawData()
method SetAutoContentLength (line 136) | public void SetAutoContentLength()
method GetRawHttpRequest (line 167) | public byte[] GetRawHttpRequest()
method GetHttpRequest (line 196) | public static HttpRequest GetHttpRequest(string yourRequest)
FILE: HttpHelper/HttpResponse.cs
class HttpResponse (line 11) | [Serializable]
method HttpResponse (line 65) | public HttpResponse()
method SetResponseLine (line 71) | private void SetResponseLine(string yourResponseLine)
method UpdataResponseLine (line 92) | private void UpdataResponseLine()
method ChangeRawData (line 100) | public void ChangeRawData()
method SetAutoContentLength (line 108) | public void SetAutoContentLength()
method GetRawHttpResponse (line 153) | public byte[] GetRawHttpResponse()
method GetHttpResponse (line 182) | public static HttpResponse GetHttpResponse(string yourResponse)
FILE: HttpHelper/ParameterContentModific.cs
class ParameterContentModific (line 13) | [Serializable]
method SetUseParameterInfo (line 31) | public void SetUseParameterInfo(bool isUseParameter , ActuatorStaticDa...
method ParameterContentModific (line 45) | public ParameterContentModific(string targetKey, string replaceContent...
method ParameterContentModific (line 53) | public ParameterContentModific() : this(null, null, null, false)
method ParameterContentModific (line 58) | public ParameterContentModific(string targetKey, string replaceContent...
method GetFinalContent (line 63) | public string GetFinalContent(string sourceContent, NameValueCollectio...
method GetFinalContent (line 86) | public new string GetFinalContent(string sourceContent)
FILE: HttpHelper/ParameterHttpRequest.cs
class ParameterHttpRequest (line 13) | [Serializable]
method ParameterHttpRequest (line 23) | public ParameterHttpRequest()
method ParameterHttpRequest (line 27) | public ParameterHttpRequest(string yourRequest, bool isParameter)
method ParameterHttpRequest (line 34) | private ParameterHttpRequest(HttpRequest httpRequest)
method SetUseParameterInfo (line 42) | public void SetUseParameterInfo(bool isUseParameter ,ActuatorStaticDat...
method GetRawHttpRequest (line 48) | public new byte[] GetRawHttpRequest()
method GetRawHttpRequest (line 53) | public byte[] GetRawHttpRequest(out string errorMes, out NameValueColl...
method UpdateHttpRequest (line 68) | public HttpRequest UpdateHttpRequest(out string errorMes, out NameValu...
method GetHttpRequest (line 83) | public static ParameterHttpRequest GetHttpRequest(string yourRequest, ...
method GetHttpRequest (line 91) | public static ParameterHttpRequest GetHttpRequest(string yourRequest, ...
FILE: HttpHelper/ParameterHttpResponse.cs
class ParameterHttpResponse (line 13) | [Serializable]
method ParameterHttpResponse (line 22) | public ParameterHttpResponse(string yourResponse, bool isParameter)
method ParameterHttpResponse (line 29) | public ParameterHttpResponse()
method ParameterHttpResponse (line 34) | private ParameterHttpResponse(HttpResponse httpResponse)
method SetUseParameterInfo (line 42) | public void SetUseParameterInfo(bool isUseParameter, ActuatorStaticDat...
method GetRawHttpResponse (line 48) | public new byte[] GetRawHttpResponse()
method GetRawHttpResponse (line 53) | public byte[] GetRawHttpResponse(out string errorMes, out NameValueCol...
method UpdateHttpResponse (line 68) | public HttpResponse UpdateHttpResponse(out string errorMes, out NameVa...
method GetHttpResponse (line 83) | public static ParameterHttpResponse GetHttpResponse(string yourRespons...
method GetHttpResponse (line 91) | public static ParameterHttpResponse GetHttpResponse(string yourRespons...
FILE: MyHelper/MyExtensionMethods.cs
class MyExtensionMethods (line 12) | public static class MyExtensionMethods
method MyClone (line 14) | public static List<T> MyClone<T>(this List<T> list)
method MyDeepClone (line 25) | public static T MyDeepClone<T>(this T source) where T : IFiddlerHttpTa...
method MyContains (line 39) | public static bool MyContains<T>(this List<T> list, T item)
FILE: MyHelper/MyGlobalHelper.cs
class MyGlobalHelper (line 11) | public class MyGlobalHelper
class GlobalMessageEventArgs (line 13) | public class GlobalMessageEventArgs : EventArgs
method GlobalMessageEventArgs (line 17) | public GlobalMessageEventArgs(bool isErrorMessage, string message)
method MyGlobalHelper (line 33) | static MyGlobalHelper()
method PutGlobalMessage (line 39) | public static void PutGlobalMessage(object sender, GlobalMessageEventA...
method IsAdministrator (line 47) | public static bool IsAdministrator()
FILE: MyHelper/MyJsonHelper.cs
class MyJsonHelper (line 10) | public class MyJsonHelper
class JsonDataContractJsonSerializer (line 12) | public class JsonDataContractJsonSerializer
method ObjectToJsonStr (line 19) | public static string ObjectToJsonStr(object obj)
method ObjectToJsonStream (line 33) | public static Stream ObjectToJsonStream(object obj)
method JsonStringToObject (line 41) | public static T JsonStringToObject<T>(string str)
method JsonStreamToObject (line 64) | public static T JsonStreamToObject<T>(Stream jsonStream)
FILE: MyHelper/MyKeyValuePair.cs
class MyKeyValuePair (line 9) | [Serializable]
method MyKeyValuePair (line 27) | public MyKeyValuePair(TKey key, TValue value)
method MyKeyValuePair (line 33) | public MyKeyValuePair()
method ToString (line 39) | public override string ToString()
method Equals (line 56) | public bool Equals(MyKeyValuePair<TKey, TValue> yourKvp)
method Equals (line 66) | public override bool Equals(object obj)
method GetHashCode (line 75) | public override int GetHashCode()
method Clone (line 87) | public object Clone()
FILE: MyHelper/SelfUpgradeHelp.cs
class SelfUpgradeHelp (line 12) | public class SelfUpgradeHelp
method GetFreeHttpDllPath (line 15) | private static string GetFreeHttpDllPath()
method DownloadUpgradeFileAsync (line 38) | private static async Task<bool> DownloadUpgradeFileAsync(string uri, s...
method UpdateDllAsync (line 67) | public static async Task<string> UpdateDllAsync(string sourceFileUrl)
FILE: MyHelper/SerializableHelper.cs
class SerializableHelper (line 15) | class SerializableHelper
method SerializeRuleList (line 17) | public static void SerializeRuleList(ListView requestRuleListView, Lis...
method DeserializeRuleList (line 50) | public static FiddlerModificHttpRuleCollection DeserializeRuleList()
method SerializeData (line 117) | public static void SerializeData<T>(T modificSettingInfo, string fileP...
method DeserializeData (line 129) | public static T DeserializeData<T>(string filePath)
method SerializeContractData (line 170) | public static void SerializeContractData<T>(T serializeClass, string f...
method DeserializeContractData (line 183) | public static T DeserializeContractData<T>(string filePath)
FILE: Properties/Resources.Designer.cs
class Resources (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
method Resources (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...
FILE: Resources/MyResource.Designer.cs
class MyResource (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
method MyResource (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...
FILE: WebService/ConfigurationData.cs
class ConfigurationData (line 9) | public class ConfigurationData
FILE: WebService/DataModel/BaseResultModel.cs
type ReturnStatus (line 10) | [DataContract]
class BaseResultModel (line 18) | [DataContract]
method BaseResultModel (line 21) | public BaseResultModel(int? code = 0, string message = null, T result ...
FILE: WebService/DataModel/RuleDetails.cs
class RuleDetails (line 12) | [DataContract]
class RuleCell (line 15) | [DataContract]
method RuleCell (line 19) | public RuleCell() { }
method RuleDetails (line 27) | public RuleDetails()
FILE: WebService/DataModel/ShareRuleSummary.cs
class ShareRuleSummary (line 9) | public class ShareRuleSummary
class RuleToken (line 11) | public class RuleToken
FILE: WebService/FeedbackService.cs
class FeedbackService (line 10) | public class FeedbackService
class Feedback (line 12) | [System.Runtime.Serialization.DataContract()]
method Feedback (line 26) | public Feedback(string token ,string mac, String machine, string con...
method SubmitFeedbackAsync (line 37) | public static async Task<int> SubmitFeedbackAsync(string userToken ,st...
method SubmitFeedbackAsync (line 42) | public static async Task<int> SubmitFeedbackAsync(Feedback feedback)
method SubmitFeedbackTask (line 63) | public static void SubmitFeedbackTask(string mac, string contact, stri...
FILE: WebService/HttpServer/CertificatesHelper.cs
class CertificatesHelper (line 11) | public class CertificatesHelper
method SetupSsl (line 13) | public static bool SetupSsl(int port)
method AddCertificateToX509Store (line 62) | public static void AddCertificateToX509Store(X509Certificate2 cert)
method BindingCertificate (line 74) | public static void BindingCertificate(X509Certificate2 cert, int port)
method BindingCertificate (line 84) | public static void BindingCertificate(String certHash, int port)
method ExecuteNetsh (line 93) | private static void ExecuteNetsh(string arguments)
FILE: WebService/HttpServer/MyHttpListener.cs
class MyHttpListener (line 11) | public class MyHttpListener
class HttpListenerMessageEventArgs (line 13) | public class HttpListenerMessageEventArgs : EventArgs
method HttpListenerMessageEventArgs (line 17) | public HttpListenerMessageEventArgs(bool isErrorMessage, string mess...
method MyHttpListener (line 26) | public MyHttpListener()
method Start (line 40) | public bool Start(string prefixes)
method Start (line 44) | public bool Start(string[] prefixesArray ,bool isClear)
method Close (line 96) | public void Close()
method Stop (line 105) | public void Stop()
method ListenerAsync (line 113) | private async void ListenerAsync()
method ListenerWorker (line 148) | private void ListenerWorker()
FILE: WebService/HttpServer/MySocketHelper.cs
class MySocketHelper (line 11) | public class MySocketHelper
method IsPortInTcpListening (line 13) | public static bool IsPortInTcpListening(int port)
FILE: WebService/MyWebTool.cs
class MyWebTool (line 28) | public class MyWebTool
class HttpMultipartDate (line 30) | public class HttpMultipartDate
method HttpMultipartDate (line 61) | public HttpMultipartDate()
method HttpMultipartDate (line 74) | public HttpMultipartDate(string yourName, string yourFileName, strin...
class HttpHelper (line 85) | public class HttpHelper
method HttpHelper (line 90) | static HttpHelper()
method AddHttpHeads (line 111) | public static void AddHttpHeads(HttpWebRequest httpWebRequest, List<...
method AddHttpHeads (line 140) | public static void AddHttpHeads(WebHeaderCollection header, List<Key...
method SetHeaderValue (line 174) | public static void SetHeaderValue(WebHeaderCollection header, string...
class HttpTimeLine (line 185) | public class HttpTimeLine
method HttpTimeLine (line 197) | public HttpTimeLine()
class MyHttpResponse (line 206) | public class MyHttpResponse
method MyHttpResponse (line 221) | public MyHttpResponse()
method SavaData (line 304) | internal void SavaData(string saveFileName)
method SeekResponseStream (line 358) | internal void SeekResponseStream()
class MyHttp (line 403) | public class MyHttp
method MyHttp (line 469) | static MyHttp()
method MyRemoteCertificateValidationCallback (line 489) | private static bool MyRemoteCertificateValidationCallback(object sen...
method MyHttp (line 498) | public MyHttp()
method MyHttp (line 507) | public MyHttp(bool isRecordRequestTimeLine, bool isWithDefaultCookie...
method SendData (line 522) | public string SendData(string url, string data, string method)
method SendData (line 532) | public string SendData(string url)
method SendData (line 545) | public string SendData(string url, string data, string method, List<...
method SendData (line 559) | public string SendData(string url, string data, string method, List<...
method SendData (line 574) | public string SendData(string url, string data, string method, List<...
method SendData (line 590) | public string SendData(string url, string data, string method, List<...
method SendHttpRequest (line 607) | public MyHttpResponse SendHttpRequest(string url, string queryStr, s...
method SendMultipartRequest (line 778) | public MyHttpResponse SendMultipartRequest(string url, List<KeyValue...
method HttpPostData (line 1035) | public string HttpPostData(string url, List<KeyValuePair<string, str...
method HttpPostData (line 1051) | public string HttpPostData(string url, List<KeyValuePair<string, str...
method HttpPostData (line 1063) | public string HttpPostData(string url, HttpMultipartDate HttpMultipa...
method GetError (line 1070) | internal static void GetError(Exception ex)
method DownloadFile (line 1081) | public static void DownloadFile(string url, List<KeyValuePair<string...
method DownloadFile (line 1095) | public static void DownloadFile(string url, string saveFileName)
FILE: WebService/OperationReportService.cs
class OperationReportService (line 12) | public class OperationReportService
class OperationDetail (line 15) | [System.Runtime.Serialization.DataContract()]
class OperationDetailCell (line 18) | public class OperationDetailCell
method OperationDetail (line 38) | public OperationDetail(string mac = "FF:FF:FF;FF:FF:FF" , string mac...
method AddCell (line 46) | public void AddCell(DateTime inTime, DateTime outTime, int requestRu...
method OperationReportService (line 65) | public OperationReportService()
method InOperation (line 79) | public void InOperation(DateTime inTime)
method OutOperation (line 84) | public void OutOperation( DateTime outTime, int requestRuleCount, int ...
method ReportAsync (line 90) | public async void ReportAsync()
method StartReportThread (line 97) | public void StartReportThread()
method Report (line 104) | private void Report()
FILE: WebService/RemoteLogService.cs
class RemoteLogService (line 13) | public class RemoteLogService
class RemoteLogDetail (line 15) | [System.Runtime.Serialization.DataContract()]
type RemoteLogOperation (line 35) | public enum RemoteLogOperation
type RemoteLogType (line 52) | public enum RemoteLogType
method RemoteLogService (line 61) | static RemoteLogService()
method ReportLogAsync (line 66) | public static async Task ReportLogAsync(string message , RemoteLogOper...
FILE: WebService/RemoteRuleService.cs
class RemoteRuleService (line 15) | public class RemoteRuleService
method RemoteRuleService (line 20) | static RemoteRuleService()
method GetRemoteRuleAsync (line 28) | public static async Task<RuleDetails> GetRemoteRuleAsync(string token ...
method UploadRulesAsync (line 137) | public static async Task<string> UploadRulesAsync<T1, T2>(List<T1> req...
FILE: WebService/ShareRuleService.cs
class ShareRuleService (line 13) | public class ShareRuleService: RemoteRuleService
method ShareRuleService (line 21) | public ShareRuleService(string personalUserInfoStr)
method GetShareRuleSummaryAsync (line 27) | public async Task<ShareRuleSummary> GetShareRuleSummaryAsync()
method SaveShareRulesAsync (line 58) | public async Task<KeyValuePair<string, string>> SaveShareRulesAsync(st...
method UpdateShareRulesAsync (line 88) | public async Task<bool> UpdateShareRulesAsync(string shareToken, bool ...
method GetShareRuleDetailAsync (line 122) | public async Task<RuleDetails> GetShareRuleDetailAsync(string token)
method DeleteShareRuleDetailAsync (line 132) | public async Task<bool> DeleteShareRuleDetailAsync(string token)
FILE: WebService/UpgradeService.cs
class UpgradeService (line 13) | public class UpgradeService
class UpdateInfo (line 15) | [DataContract]
class UpgradeServiceEventArgs (line 42) | public class UpgradeServiceEventArgs : EventArgs
method UpgradeServiceEventArgs (line 47) | public UpgradeServiceEventArgs(bool isSuccess, UpdateInfo upgradeInfo)
method UpgradeService (line 62) | static UpgradeService()
method UpgradeService (line 67) | public UpgradeService()
method StartCheckUpgrade (line 73) | public void StartCheckUpgrade()
method TrySilentUpgrade (line 136) | public void TrySilentUpgrade()
method StartSilentUpgrade (line 147) | private void StartSilentUpgrade()
method StartCheckUpgradeThread (line 173) | public void StartCheckUpgradeThread()
method CheckUpgrade (line 185) | private void CheckUpgrade()
FILE: WebService/UserComputerInfo.cs
class UserComputerInfo (line 10) | internal class UserComputerInfo
method GetComputerMac (line 14) | internal static string GetComputerMac()
method GetMachineName (line 51) | internal static string GetMachineName()
method GetUserName (line 63) | internal static string GetUserName()
method GetFreeHttpVersion (line 75) | internal static string GetFreeHttpVersion()
method GetRuleVersion (line 80) | internal static string GetRuleVersion()
method GetFreeHttpUser (line 85) | internal static string GetFreeHttpUser()
method GetDotNetRelease (line 97) | internal static int GetDotNetRelease()
Condensed preview — 168 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,782K chars).
[
{
"path": ".dockerignore",
"chars": 274,
"preview": "**/.dockerignore\n**/.env\n**/.git\n**/.gitignore\n**/.vs\n**/.vscode\n**/*.*proj.user\n**/azds.yaml\n**/charts\n**/bin\n**/obj\n**"
},
{
"path": ".gitattributes",
"chars": 378,
"preview": "# Auto detect text files and perform LF normalization\n* text=auto\n\n# Custom for Visual Studio\n*.cs diff=csharp\n\n# St"
},
{
"path": ".gitignore",
"chars": 5763,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n##\n## G"
},
{
"path": "AutoTest/CsvFileHelper.cs",
"chars": 31995,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\n\n/*************"
},
{
"path": "AutoTest/MyBytesHelper.cs",
"chars": 15342,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "AutoTest/MyCommonTool.cs",
"chars": 3354,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "AutoTest/MyExtensionMethods.cs",
"chars": 7708,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Collections.Specialized;\nusing System.Linq;\nusing System.T"
},
{
"path": "AutoTest/ParameterizationContent/CaseParameterizationContent.cs",
"chars": 5781,
"preview": "using FreeHttp.AutoTest.RunTimeStaticData;\nusing System;\nusing System.Collections.Generic;\nusing System.Collections.Spe"
},
{
"path": "AutoTest/ParameterizationContent/ParameterizationContentEncodingType.cs",
"chars": 555,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "AutoTest/ParameterizationContent/ParameterizationContentHelper.cs",
"chars": 10628,
"preview": "using FreeHttp.AutoTest.RunTimeStaticData;\nusing System;\nusing System.Collections.Generic;\nusing System.Collections.Spe"
},
{
"path": "AutoTest/ParameterizationPick/ParameterPick.cs",
"chars": 2814,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing System.Tex"
},
{
"path": "AutoTest/ParameterizationPick/ParameterPickHelper.cs",
"chars": 13590,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressi"
},
{
"path": "AutoTest/ParameterizationPick/ParameterPickType.cs",
"chars": 394,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "AutoTest/RunTimeStaticData/ActuatorStaticDataCollection.cs",
"chars": 22267,
"preview": "using FreeHttp.AutoTest.RunTimeStaticData.MyStaticData;\nusing System;\nusing System.Collections;\nusing System.Collection"
},
{
"path": "AutoTest/RunTimeStaticData/CaseRunTimeDataTypeEngine.cs",
"chars": 19106,
"preview": "#define ALLOW_CSV_EMPTY\n\nusing FreeHttp.AutoTest.RunTimeStaticData.MyStaticData;\nusing System;\nusing System.Collections"
},
{
"path": "AutoTest/RunTimeStaticData/CaseStaticDataType.cs",
"chars": 802,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "AutoTest/RunTimeStaticData/IRunTimeDataSource.cs",
"chars": 1177,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "AutoTest/RunTimeStaticData/IRunTimeStaticData.cs",
"chars": 1523,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataIndex.cs",
"chars": 2785,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing System.Tex"
},
{
"path": "AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataList.cs",
"chars": 3054,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing System.Tex"
},
{
"path": "AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataLong.cs",
"chars": 2867,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing System.Tex"
},
{
"path": "AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataNowTime.cs",
"chars": 2499,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing System.Tex"
},
{
"path": "AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataRandomStr.cs",
"chars": 1971,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing System.Tex"
},
{
"path": "AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataSourceCsv.cs",
"chars": 7725,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Drawing;\nusing System.Linq;\nusing System.Runtime.Serializa"
},
{
"path": "AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataStrIndex.cs",
"chars": 3359,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing System.Tex"
},
{
"path": "AutoTest/RunTimeStaticData/MyStaticData/MyStaticDataValue.cs",
"chars": 1432,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusi"
},
{
"path": "AutoTest/RunTimeStaticData/RunTimeStaticDataHelper.cs",
"chars": 4455,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "FiddlerFreeHttp.cs",
"chars": 33991,
"preview": "using Fiddler;\nusing FreeHttp.AutoTest.RunTimeStaticData;\nusing FreeHttp.FiddlerHelper;\nusing FreeHttp.FreeHttpControl;"
},
{
"path": "FiddlerHelper/FiddlerActuatorStaticDataCollectionController.cs",
"chars": 1436,
"preview": "using FreeHttp.AutoTest.RunTimeStaticData;\nusing FreeHttp.AutoTest.RunTimeStaticData.MyStaticData;\nusing System;\nusing "
},
{
"path": "FiddlerHelper/FiddlerHttpFilter.cs",
"chars": 14208,
"preview": "using Fiddler;\nusing FreeHttp.AutoTest;\nusing FreeHttp.HttpHelper;\nusing FreeHttp.MyHelper;\nusing System;\nusing System."
},
{
"path": "FiddlerHelper/FiddlerModificHttpRuleCollection.cs",
"chars": 1046,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\n\nn"
},
{
"path": "FiddlerHelper/FiddlerModificSettingInfo.cs",
"chars": 2494,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "FiddlerHelper/FiddlerRequsetChange.cs",
"chars": 3669,
"preview": "using FreeHttp.AutoTest.ParameterizationPick;\nusing FreeHttp.AutoTest.RunTimeStaticData;\nusing FreeHttp.AutoTest.RunTim"
},
{
"path": "FiddlerHelper/FiddlerResponseChange.cs",
"chars": 3498,
"preview": "using FreeHttp.AutoTest.ParameterizationPick;\nusing FreeHttp.AutoTest.RunTimeStaticData;\nusing FreeHttp.AutoTest.RunTim"
},
{
"path": "FiddlerHelper/FiddlerRuleGroup.cs",
"chars": 12584,
"preview": "using FreeHttp.WebService;\nusing System;\nusing System.Collections.Generic;\nusing System.Drawing;\nusing System.Linq;\nusi"
},
{
"path": "FiddlerHelper/FiddlerSessionHelper.cs",
"chars": 2328,
"preview": "using Fiddler;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threa"
},
{
"path": "FiddlerHelper/IFiddlerHttpTamper.cs",
"chars": 708,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing System.Tex"
},
{
"path": "FiddlerHelper/TamperProtocalType.cs",
"chars": 118,
"preview": "\nnamespace FreeHttp.FiddlerHelper\n{\n public enum TamperProtocalType\n {\n Http,\n WebSocket\n }\n}\n"
},
{
"path": "FiddlerHelper/VersionControl/FiddlerModificHttpRuleCollectionV1.cs",
"chars": 5742,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n//u"
},
{
"path": "FiddlerSessionTamper.cs",
"chars": 32820,
"preview": "using Fiddler;\nusing FreeHttp.FiddlerHelper;\nusing FreeHttp.HttpHelper;\nusing FreeHttp.AutoTest;\nusing System;\nusing Sy"
},
{
"path": "FreeHttp.csproj",
"chars": 23314,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.micros"
},
{
"path": "FreeHttp.sln",
"chars": 2573,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.2880"
},
{
"path": "FreeHttpControl/ChangeEncodeForm.Designer.cs",
"chars": 6763,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class ChangeEncodeForm\n {\n /// <summary>\n /// Require"
},
{
"path": "FreeHttpControl/ChangeEncodeForm.cs",
"chars": 4129,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
},
{
"path": "FreeHttpControl/ChangeEncodeForm.resx",
"chars": 31146,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/ControlHelper/LoadBitmap.cs",
"chars": 2282,
"preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Drawing;\nusing System.Drawing.Dr"
},
{
"path": "FreeHttpControl/ControlHelper/LoadWindowService.cs",
"chars": 2224,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusi"
},
{
"path": "FreeHttpControl/ControlHelper/MarkControlService.cs",
"chars": 6181,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing Syste"
},
{
"path": "FreeHttpControl/ControlHelper/MyControlHelper.cs",
"chars": 6559,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Drawing;\nusing System.Linq;\nusing System.Runtime.InteropSe"
},
{
"path": "FreeHttpControl/EditCookieForm.Designer.cs",
"chars": 6592,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class EditCookieForm\n {\n /// <summary>\n /// Required "
},
{
"path": "FreeHttpControl/EditCookieForm.cs",
"chars": 2261,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
},
{
"path": "FreeHttpControl/EditCookieForm.resx",
"chars": 84409,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/EditKeyVaule.Designer.cs",
"chars": 4472,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class EditKeyVaule\n {\n /// <summary>\n /// Required de"
},
{
"path": "FreeHttpControl/EditKeyVaule.cs",
"chars": 3235,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
},
{
"path": "FreeHttpControl/EditKeyVaule.resx",
"chars": 106335,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/EditParameterPickWindow.Designer.cs",
"chars": 4597,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class EditParameterPickWindow\n {\n /// <summary>\n /// "
},
{
"path": "FreeHttpControl/EditParameterPickWindow.cs",
"chars": 6357,
"preview": "using FreeHttp.AutoTest.ParameterizationPick;\nusing FreeHttp.FreeHttpControl.MyControl;\nusing System;\nusing System.Coll"
},
{
"path": "FreeHttpControl/EditParameterPickWindow.resx",
"chars": 42363,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/EditSheetForm.Designer.cs",
"chars": 6929,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class EditSheetForm\n {\n /// <summary>\n /// Required d"
},
{
"path": "FreeHttpControl/EditSheetForm.cs",
"chars": 7083,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
},
{
"path": "FreeHttpControl/EditSheetForm.resx",
"chars": 116721,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/FreeHttpWindow.Designer.cs",
"chars": 133149,
"preview": "using FreeHttp;\n\nnamespace FreeHttp.FreeHttpControl\n{\n partial class FreeHttpWindow\n {\n /// <summary> \n "
},
{
"path": "FreeHttpControl/FreeHttpWindow.cs",
"chars": 88429,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "FreeHttpControl/FreeHttpWindow.resx",
"chars": 271060,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/FreeHttpWindowFunction.cs",
"chars": 62390,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "FreeHttpControl/GetRemoteRuleWindow.Designer.cs",
"chars": 19985,
"preview": "\nnamespace FreeHttp.FreeHttpControl\n{\n partial class GetRemoteRuleWindow\n {\n /// <summary>\n /// Req"
},
{
"path": "FreeHttpControl/GetRemoteRuleWindow.cs",
"chars": 26906,
"preview": "using FreeHttp.AutoTest.RunTimeStaticData;\nusing FreeHttp.FiddlerHelper;\nusing FreeHttp.FreeHttpControl.ControlHelper;\n"
},
{
"path": "FreeHttpControl/GetRemoteRuleWindow.resx",
"chars": 12566,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/HttpFilterWindow.Designer.cs",
"chars": 9530,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class HttpFilterWindow\n {\n /// <summary>\n /// Require"
},
{
"path": "FreeHttpControl/HttpFilterWindow.cs",
"chars": 6899,
"preview": "using FreeHttp.FiddlerHelper;\nusing FreeHttp.HttpHelper;\nusing FreeHttp.MyHelper;\nusing System;\nusing System.Collection"
},
{
"path": "FreeHttpControl/HttpFilterWindow.resx",
"chars": 20329,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/MyBaseInfoWindow.cs",
"chars": 9548,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Windows.Forms;\nusing"
},
{
"path": "FreeHttpControl/MyBaseInfoWindow.resx",
"chars": 5695,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prima"
},
{
"path": "FreeHttpControl/MyControl/AddParameterPickBox.Designer.cs",
"chars": 8861,
"preview": "namespace FreeHttp.FreeHttpControl.MyControl\n{\n partial class AddParameterPickBox\n {\n /// <summary> \n "
},
{
"path": "FreeHttpControl/MyControl/AddParameterPickBox.cs",
"chars": 7053,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "FreeHttpControl/MyControl/AddParameterPickBox.resx",
"chars": 48766,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/MyControl/CBalloonBase.cs",
"chars": 31428,
"preview": "using System;\nusing System.Drawing;\nusing System.Drawing.Drawing2D;\nusing System.Collections;\nusing System.ComponentMode"
},
{
"path": "FreeHttpControl/MyControl/CBalloonBase.resx",
"chars": 5695,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prima"
},
{
"path": "FreeHttpControl/MyControl/EditListView.Designer.cs",
"chars": 6208,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class EditListView\n {\n /// <summary> \n /// 必需的设计器变量。\n"
},
{
"path": "FreeHttpControl/MyControl/EditListView.cs",
"chars": 3790,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "FreeHttpControl/MyControl/EditListView.resx",
"chars": 48401,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/MyControl/ListViewExtended.cs",
"chars": 23858,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Windows.Forms;\nusing System.ComponentMo"
},
{
"path": "FreeHttpControl/MyControl/MyEnableSwitch.Designer.cs",
"chars": 2494,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class MyEnableSwitch\n {\n /// <summary> \n /// 必需的设计器变量"
},
{
"path": "FreeHttpControl/MyControl/MyEnableSwitch.cs",
"chars": 1707,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "FreeHttpControl/MyControl/MyEnableSwitch.resx",
"chars": 11683,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/MyControl/MyEnabledPictureButton.cs",
"chars": 2283,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Linq;\nu"
},
{
"path": "FreeHttpControl/MyControl/MyListView.cs",
"chars": 9373,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing Syste"
},
{
"path": "FreeHttpControl/MyControl/MyListView.resx",
"chars": 5874,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/MyControl/MyPanel.cs",
"chars": 683,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "FreeHttpControl/MyControl/MySwitchPictureButton.cs",
"chars": 2776,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Linq;\nu"
},
{
"path": "FreeHttpControl/MyControl/RawRequestEdit.Designer.cs",
"chars": 3645,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class RawRequestEdit\n {\n /// <summary> \n /// 必需的设计器变量"
},
{
"path": "FreeHttpControl/MyControl/RawRequestEdit.cs",
"chars": 1385,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "FreeHttpControl/MyControl/RawRequestEdit.resx",
"chars": 7532,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/MyControl/RawResponseEdit.cs",
"chars": 9345,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "FreeHttpControl/MyControl/RawResponseEdit.designer.cs",
"chars": 7786,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class RawResponseEdit\n {\n /// <summary> \n /// 必需的设计器变"
},
{
"path": "FreeHttpControl/MyControl/RawResponseEdit.resx",
"chars": 14822,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/MyControl/TextBoxEditer.Designer.cs",
"chars": 2795,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class TextBoxEditer\n {\n /// <summary> \n /// 必需的设计器变量。"
},
{
"path": "FreeHttpControl/MyControl/TextBoxEditer.cs",
"chars": 6292,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "FreeHttpControl/MyControl/TextBoxEditer.resx",
"chars": 6327,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/MyControl/WatermakTextBox.cs",
"chars": 1084,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Linq;\nusing System.Runtime.In"
},
{
"path": "FreeHttpControl/RemoveHead.Designer.cs",
"chars": 3437,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class RemoveHead\n {\n /// <summary>\n /// Required desi"
},
{
"path": "FreeHttpControl/RemoveHead.cs",
"chars": 2456,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
},
{
"path": "FreeHttpControl/RemoveHead.resx",
"chars": 20329,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/RuleInfoWindow.cs",
"chars": 17798,
"preview": "using FreeHttp.FiddlerHelper;\nusing System;\nusing System.CodeDom.Compiler;\nusing System.Collections.Generic;\nusing Syst"
},
{
"path": "FreeHttpControl/RuleInfoWindow.designer.cs",
"chars": 6662,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class RuleInfoWindow\n {\n /// <summary>\n /// 必需的设计器变量。"
},
{
"path": "FreeHttpControl/RuleInfoWindow.resx",
"chars": 8957,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prima"
},
{
"path": "FreeHttpControl/SaveShareRule.Designer.cs",
"chars": 6323,
"preview": "\nnamespace FreeHttp.FreeHttpControl\n{\n partial class SaveShareRule\n {\n /// <summary>\n /// Required "
},
{
"path": "FreeHttpControl/SaveShareRule.cs",
"chars": 5585,
"preview": "using FreeHttp.FreeHttpControl.ControlHelper;\nusing FreeHttp.WebService;\nusing System;\nusing System.Windows.Forms;\n\nnam"
},
{
"path": "FreeHttpControl/SaveShareRule.resx",
"chars": 31146,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/SetVaule.Designer.cs",
"chars": 3496,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class SetVaule\n {\n /// <summary>\n /// Required design"
},
{
"path": "FreeHttpControl/SetVaule.cs",
"chars": 2115,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
},
{
"path": "FreeHttpControl/SetVaule.resx",
"chars": 106335,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/SettingWindow.Designer.cs",
"chars": 11841,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class SettingWindow\n {\n /// <summary>\n /// Required d"
},
{
"path": "FreeHttpControl/SettingWindow.cs",
"chars": 8368,
"preview": "using FreeHttp.FiddlerHelper;\nusing FreeHttp.HttpHelper;\nusing FreeHttp.MyHelper;\nusing System;\nusing System.Collection"
},
{
"path": "FreeHttpControl/SettingWindow.resx",
"chars": 104053,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/ShowSheetForm.Designer.cs",
"chars": 2494,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class ShowSheetForm\n {\n /// <summary>\n /// Required d"
},
{
"path": "FreeHttpControl/ShowSheetForm.cs",
"chars": 1701,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
},
{
"path": "FreeHttpControl/ShowSheetForm.resx",
"chars": 106335,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/ShowTextForm.Designer.cs",
"chars": 2529,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class ShowTextForm\n {\n /// <summary>\n /// Required de"
},
{
"path": "FreeHttpControl/ShowTextForm.cs",
"chars": 706,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
},
{
"path": "FreeHttpControl/ShowTextForm.resx",
"chars": 106335,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/SortRule.Designer.cs",
"chars": 1844,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class SortRule\n {\n /// <summary>\n /// Required design"
},
{
"path": "FreeHttpControl/SortRule.cs",
"chars": 570,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
},
{
"path": "FreeHttpControl/SortRule.resx",
"chars": 20329,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/StaticDataAddWindow.Designer.cs",
"chars": 8152,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class StaticDataAddWindow\n {\n /// <summary>\n /// Requ"
},
{
"path": "FreeHttpControl/StaticDataAddWindow.cs",
"chars": 4490,
"preview": "using FreeHttp.AutoTest.RunTimeStaticData;\nusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;"
},
{
"path": "FreeHttpControl/StaticDataAddWindow.resx",
"chars": 27861,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/StaticDataManageWindow.Designer.cs",
"chars": 16678,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class StaticDataManageWindow\n {\n private System.Windows.Form"
},
{
"path": "FreeHttpControl/StaticDataManageWindow.cs",
"chars": 15207,
"preview": "using FreeHttp.AutoTest.RunTimeStaticData;\nusing FreeHttp.AutoTest.RunTimeStaticData.MyStaticData;\nusing System;\nusing "
},
{
"path": "FreeHttpControl/StaticDataManageWindow.resx",
"chars": 99244,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "FreeHttpControl/UserFeedbackWindow.Designer.cs",
"chars": 5351,
"preview": "namespace FreeHttp.FreeHttpControl\n{\n partial class UserFeedbackWindow\n {\n /// <summary>\n /// Requi"
},
{
"path": "FreeHttpControl/UserFeedbackWindow.cs",
"chars": 2052,
"preview": "//#define NET4_5UP\nusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusin"
},
{
"path": "FreeHttpControl/UserFeedbackWindow.resx",
"chars": 7703,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "HttpHelper/ContentModific.cs",
"chars": 9417,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing System.Tex"
},
{
"path": "HttpHelper/HttpRequest.cs",
"chars": 11039,
"preview": "using FreeHttp.MyHelper;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing Syst"
},
{
"path": "HttpHelper/HttpResponse.cs",
"chars": 11617,
"preview": "using FreeHttp.MyHelper;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing Syst"
},
{
"path": "HttpHelper/ParameterContentModific.cs",
"chars": 3797,
"preview": "using FreeHttp.AutoTest.ParameterizationContent;\nusing FreeHttp.AutoTest.RunTimeStaticData;\nusing System;\nusing System."
},
{
"path": "HttpHelper/ParameterHttpRequest.cs",
"chars": 4268,
"preview": "using FreeHttp.AutoTest.ParameterizationContent;\nusing FreeHttp.AutoTest.RunTimeStaticData;\nusing System;\nusing System."
},
{
"path": "HttpHelper/ParameterHttpResponse.cs",
"chars": 4304,
"preview": "using FreeHttp.AutoTest.ParameterizationContent;\nusing FreeHttp.AutoTest.RunTimeStaticData;\nusing System;\nusing System."
},
{
"path": "LICENSE",
"chars": 1086,
"preview": "MIT License\n\nCopyright (c) 2018 lulianqi (mycllq@hotmail.com)\n\nPermission is hereby granted, free of charge, to any pers"
},
{
"path": "MyHelper/MyExtensionMethods.cs",
"chars": 1992,
"preview": "using FreeHttp.FiddlerHelper;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing"
},
{
"path": "MyHelper/MyGlobalHelper.cs",
"chars": 1819,
"preview": "using FreeHttp.WebService.HttpServer;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.S"
},
{
"path": "MyHelper/MyJsonHelper.cs",
"chars": 3121,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Thr"
},
{
"path": "MyHelper/MyKeyValuePair.cs",
"chars": 2275,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "MyHelper/SelfUpgradeHelp.cs",
"chars": 2805,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Net.Http;\nusing System"
},
{
"path": "MyHelper/SerializableHelper.cs",
"chars": 10178,
"preview": "using FreeHttp.FiddlerHelper;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing"
},
{
"path": "Properties/AssemblyInfo.cs",
"chars": 979,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// 有关程序集的常规信息通过以"
},
{
"path": "Properties/Resources.Designer.cs",
"chars": 9594,
"preview": "//------------------------------------------------------------------------------\n// <auto-generated>\n// 此代码由工具生成。\n/"
},
{
"path": "Properties/Resources.resx",
"chars": 10901,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "Resources/MyResource.Designer.cs",
"chars": 6930,
"preview": "//------------------------------------------------------------------------------\n// <auto-generated>\n// 此代码由工具生成。\n/"
},
{
"path": "Resources/MyResource.resx",
"chars": 8836,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "WebService/ConfigurationData.cs",
"chars": 610,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "WebService/DataModel/BaseResultModel.cs",
"chars": 946,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Serialization;\nusing System.Tex"
},
{
"path": "WebService/DataModel/RuleDetails.cs",
"chars": 1457,
"preview": "using FreeHttp.AutoTest.RunTimeStaticData;\nusing FreeHttp.FiddlerHelper;\nusing System;\nusing System.Collections.Generic"
},
{
"path": "WebService/DataModel/ShareRuleSummary.cs",
"chars": 869,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
},
{
"path": "WebService/FeedbackService.cs",
"chars": 3996,
"preview": "//#define NET4_5UP\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.T"
},
{
"path": "WebService/HttpServer/CertificatesHelper.cs",
"chars": 4036,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing System.Security.Cryp"
},
{
"path": "WebService/HttpServer/MyHttpListener.cs",
"chars": 5402,
"preview": "//#define NET4_5UP\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Net;\nusing System.Te"
},
{
"path": "WebService/HttpServer/MySocketHelper.cs",
"chars": 733,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Net;\nusing System.Net.NetworkInformatio"
},
{
"path": "WebService/MyWebTool.cs",
"chars": 52357,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Diagnostics;\nusing System.Net;\nusing Sy"
},
{
"path": "WebService/OperationReportService.cs",
"chars": 5229,
"preview": "using FreeHttp.AutoTest.RunTimeStaticData;\nusing FreeHttp.FiddlerHelper;\nusing System;\nusing System.Collections.Generic"
},
{
"path": "WebService/RemoteLogService.cs",
"chars": 2582,
"preview": "using FreeHttp.FiddlerHelper;\nusing FreeHttp.MyHelper;\nusing System;\nusing System.Collections.Generic;\nusing System.Lin"
},
{
"path": "WebService/RemoteRuleService.cs",
"chars": 8418,
"preview": "using FreeHttp.AutoTest.RunTimeStaticData;\nusing FreeHttp.FiddlerHelper;\nusing FreeHttp.MyHelper;\nusing FreeHttp.WebSer"
},
{
"path": "WebService/ShareRuleService.cs",
"chars": 8003,
"preview": "using FreeHttp.FiddlerHelper;\nusing FreeHttp.MyHelper;\nusing FreeHttp.WebService.DataModel;\nusing System;\nusing System."
},
{
"path": "WebService/UpgradeService.cs",
"chars": 9265,
"preview": "using System;\nusing System.Linq;\nusing System.Management;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System"
},
{
"path": "WebService/UserComputerInfo.cs",
"chars": 3136,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Management;\nusing System.Text;\nusing Sy"
},
{
"path": "packages.config",
"chars": 138,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n <package id=\"WindowsBase\" version=\"4.6.1055.0\" targetFramework=\"net"
},
{
"path": "readme.md",
"chars": 1120,
"preview": " ### 基本逻辑\n\n### 环境搭建\n* Fiddler"
}
]
About this extraction
This page contains the full source code of the lulianqi/FreeHttp GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 168 files (2.6 MB), approximately 681.9k tokens, and a symbol index with 1061 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.