CakeHostsAliases.

HostsRecordExists(ICakeContext, string, string) Method

Summary

Checks if a record already exists in hosts file
Assembly
Cake.Hosts.dll
Namespace
Cake.Hosts
Containing Type
CakeHostsAliases

Syntax

public static bool HostsRecordExists(this ICakeContext context, string ipAddress, string domainName)

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext The cake context.
ipAddress string IP address to check
domainName string Domain name to check

Return Value

Type Description
bool If given parameters already constitue a record in hosts file