• Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Design
    Unite UX
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
    • jQuery
    • Angular
    • React
    • Vue
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class HostList

The HostList allows fast determination of whether a given host is in the list. It supports leading wildcards (e.g. .foo.com), and the special tokens <local> <nonlocal> and <loopback>. Note: List is *not threadsafe; instead of updating it, construct a new one.

Inheritance
System.Object
HostList
Namespace: Fiddler
Assembly: FiddlerCore.dll

Syntax

public class HostList : Object

Constructors

HostList()

Generate an empty HostList

Declaration
public HostList()

HostList(String)

Create a hostlist and assign it an initial set of sites

Declaration
public HostList(string sInitialList)
Parameters
System.String sInitialList

List of hostnames, including leading wildcards, and optional port specifier. Special tokens are *, <local>, <nonlocal>, and <loopback>.

Methods

AssignFromString(String)

Clear the List and assign the new string as the contents of the list.

Declaration
public bool AssignFromString(string sIn)
Parameters
System.String sIn

List of hostnames, including leading wildcards, and optional port specifier. Special tokens are *, <local>, <nonlocal>, and <loopback>.

Returns
System.Boolean

TRUE if the list was constructed without errors

AssignFromString(String, out String)

Clear the list and assign the new string as the contents of the list.

Declaration
public bool AssignFromString(string sIn, out string sErrors)
Parameters
System.String sIn

List of hostnames, including leading wildcards, and optional port specifier. Special tokens are *, <local>, <nonlocal>, and <loopback>.

System.String sErrors

Outparam string containing list of parsing errors

Returns
System.Boolean

TRUE if the list was constructed without errors

Clear()

Clear the HostList

Declaration
public void Clear()

ContainsHost(String)

Determine if a given Host is in the list

Declaration
public bool ContainsHost(string sHost)
Parameters
System.String sHost

A Host string, potentially including a port

Returns
System.Boolean

TRUE if the Host's hostname matches a rule in the list

ContainsHost(String, Int32)

Determine if a given Host:Port pair matches an entry in the list

Declaration
public bool ContainsHost(string sHostname, int iPort)
Parameters
System.String sHostname

A hostname, NOT including the port

System.Int32 iPort

The port

Returns
System.Boolean

TRUE if the hostname matches a rule in the list

ContainsHostname(String)

Determine if a given Hostname is in the list

Declaration
public bool ContainsHostname(string sHostname)
Parameters
System.String sHostname

A hostname, NOT including a port

Returns
System.Boolean

TRUE if the hostname matches a rule in the list

ToString()

Return the current list of rules as a string

Declaration
public override string ToString()
Returns
System.String

String containing current rules, using "; " as a delimiter between entries

Getting Started
  • Try Now
Community
  • Forums
  • Blogs
  • Feedback Portal

Copyright © 2019 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.