-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from TechieGuy12/memoryusagefix
Memory usage fix and additional functionality
- Loading branch information
Showing
31 changed files
with
1,947 additions
and
495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using TE.FileVerification.IO; | ||
|
||
namespace TE.FileVerification.Configuration | ||
{ | ||
/// <summary> | ||
/// An exclusions node in the XML file. | ||
/// </summary> | ||
public class Exclusions : MatchBase | ||
{ | ||
/// <summary> | ||
/// Returns the flag indicating if the file/folder is to be ignored. | ||
/// </summary> | ||
/// <<param name="fullPath"> | ||
/// The full path to the file or folder. | ||
/// </param> | ||
/// <returns> | ||
/// True if the file/folder is to be ignored, otherwise false. | ||
/// </returns> | ||
public bool Exclude(string fullPath) | ||
{ | ||
FilterTypeName = "Exclude"; | ||
return IsMatchFound(fullPath); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Linq; | ||
using System.Net.Http; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Xml.Serialization; | ||
|
||
namespace TE.FileVerification.Configuration | ||
{ | ||
public class Headers | ||
{ | ||
[XmlElement("header")] | ||
public Collection<Header>? HeaderList { get; set; } | ||
|
||
/// <summary> | ||
/// Sets the headers for a request. | ||
/// </summary> | ||
/// <param name="request"> | ||
/// The request that will include the headers. | ||
/// </param> | ||
public void Set(HttpRequestMessage request) | ||
{ | ||
if (request == null) | ||
{ | ||
return; | ||
} | ||
|
||
if (HeaderList == null || HeaderList.Count <= 0) | ||
{ | ||
return; | ||
} | ||
|
||
foreach (Header header in HeaderList) | ||
{ | ||
if (!string.IsNullOrWhiteSpace(header.Name)) | ||
{ | ||
request.Headers.Add(header.Name, header.Value); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.