-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,086 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IP/@EntryIndexedValue">IP</s:String> | ||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RNG/@EntryIndexedValue">RNG</s:String></wpf:ResourceDictionary> |
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,82 @@ | ||
# Faker.Internet | ||
|
||
```cs | ||
// Optional arguments name=null, *separators | ||
Faker.Internet.Email() //=> "eliza@mann.net" | ||
Faker.Internet.Email("Nancy") //=> "nancy@terry.biz" | ||
Faker.Internet.Email("Janelle Santiago", "+") //=> janelle+santiago@becker.com" | ||
// Optional argument name=null | ||
Faker.Internet.FreeEmail() //=> "freddy@gmail.com" | ||
Faker.Internet.FreeEmail("Nancy") //=> "nancy@yahoo.com" | ||
// Optional argument name=null | ||
Faker.Internet.SafeEmail() //=> "christelle@example.org" | ||
Faker.Internet.SafeEmail("Nancy") //=> "nancy@example.net" | ||
// Optional arguments specifier=null, separators=%w(. _) | ||
Faker.Internet.Username() //=> "alexie" | ||
Faker.Internet.Username("Nancy") //=> "nancy" | ||
Faker.Internet.Username("Nancy Johnson", %w(. _ -)) //=> "johnson-nancy" | ||
// Optional arguments: min_length=5, max_length=8 | ||
Faker.Internet.Username(new Range<int>(5, 8)) | ||
|
||
// Optional argument min_length=8 | ||
Faker.Internet.Username(8) | ||
|
||
// Optional arguments: min_length=8, max_length=16 | ||
Faker.Internet.Password() //=> "Vg5mSvY1UeRg7" | ||
Faker.Internet.Password(8) //=> "YfGjIk0hGzDqS0" | ||
Faker.Internet.Password(10, 20) //=> "EoC9ShWd1hWq4vBgFw" | ||
Faker.Internet.Password(10, 20, true) //=> "3k5qS15aNmG" | ||
Faker.Internet.Password(10, 20, true, true) //=> "*%NkOnJsH4" | ||
Faker.Internet.DomainName() //=> "effertz.info" | ||
Faker.Internet.DomainWord() //=> "haleyziemann" | ||
Faker.Internet.DomainSuffix() //=> "info" | ||
Faker.Internet.IPv4Address() //=> "24.29.18.175" | ||
// Private IP range according to RFC 1918 and 127.0.0.0/8 and 169.254.0.0/16. | ||
Faker.Internet.PrivateIPv4Address() //=> "10.0.0.1" | ||
// Guaranteed not to be in the ip range from the private_ip_v4_address method. | ||
Faker.Internet.PublicIPv4Address() //=> "24.29.18.175" | ||
Faker.Internet.IPv4Cidr() //=> "24.29.18.175/21" | ||
Faker.Internet.IPv6Address() //=> "ac5f:d696:3807:1d72:2eb5:4e81:7d2b:e1df" | ||
Faker.Internet.IPv6Cidr() //=> "ac5f:d696:3807:1d72:2eb5:4e81:7d2b:e1df/78" | ||
// Optional argument prefix="" | ||
Faker.Internet.MacAddress() //=> "e6:0d:00:11:ed:4f" | ||
Faker.Internet.MacAddress("55:44:33") //=> "55:44:33:02:1d:9b" | ||
// Optional arguments: host=domain_name, path="/#{username}", scheme=scheme | ||
Faker.Internet.Url() //=> "http://thiel.com/chauncey_simonis" | ||
Faker.Internet.Url("example.com") //=> "http://example.com/clotilde.swift" | ||
Faker.Internet.Url("example.com", "/foobar.html") //=> "http://example.com/foobar.html" | ||
// Optional arguments: words=null, glue=null | ||
Faker.Internet.Slug() //=> "pariatur_laudantium" | ||
Faker.Internet.Slug("foo bar") //=> "foo.bar" | ||
Faker.Internet.Slug("foo bar", "-") //=> "foo-bar" | ||
// Optional argument: vendor=null | ||
Faker.Internet.UserAgent //=> "Mozilla/5.0 (compatible; MSIE 9.0; AOL 9.7; AOLBuild 4343.19; Windows NT 6.1; WOW64; Trident/5.0; FunWebProducts)" | ||
Faker.Internet.UserAgent(UserAgent.Firefox) //=> "Mozilla/5.0 (Windows NT x.y; Win64; x64; rv:10.0) Gecko/20100101 Firefox/10.0" | ||
``` |
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,92 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace FakerDotNet.Data | ||
{ | ||
internal static class InternetData | ||
{ | ||
public static readonly IEnumerable<string> FreeEmails = new[] | ||
{ | ||
"gmail.com", | ||
"yahoo.com", | ||
"hotmail.com" | ||
}; | ||
|
||
public static readonly IEnumerable<string> DomainSuffixes = new[] | ||
{ | ||
"com", | ||
"biz", | ||
"info", | ||
"name", | ||
"net", | ||
"org", | ||
"io", | ||
"co" | ||
}; | ||
|
||
public static readonly IEnumerable<string> SafeDomainSuffixes = new[] | ||
{ | ||
"org", | ||
"com", | ||
"net" | ||
}; | ||
|
||
public static readonly IDictionary<string, string[]> UserAgents = new Dictionary<string, string[]> | ||
{ | ||
{ | ||
"aol", | ||
new[] | ||
{ | ||
"Mozilla/5.0 (compatible; MSIE 9.0; AOL 9.7; AOLBuild 4343.19; Windows NT 6.1; WOW64; Trident/5.0; FunWebProducts)" | ||
} | ||
}, | ||
{ | ||
"chrome", | ||
new[] | ||
{ | ||
"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36" | ||
} | ||
}, | ||
{ | ||
"firefox", | ||
new[] | ||
{ | ||
"Mozilla/5.0 (Windows NT x.y; Win64; x64; rv:10.0) Gecko/20100101 Firefox/10.0" | ||
} | ||
}, | ||
{ | ||
"internet_explorer", | ||
new[] | ||
{ | ||
"Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko" | ||
} | ||
}, | ||
{ | ||
"netscape", | ||
new[] | ||
{ | ||
"Mozilla/5.0 (Windows; U; Win 9x 4.90; SG; rv:1.9.2.4) Gecko/20101104 Netscape/9.1.0285" | ||
} | ||
}, | ||
{ | ||
"opera", | ||
new[] | ||
{ | ||
"Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16" | ||
} | ||
}, | ||
{ | ||
"safari", | ||
new[] | ||
{ | ||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A" | ||
} | ||
} | ||
}; | ||
|
||
public static readonly IEnumerable<string> UsernameFormats = new[] | ||
{ | ||
"{Name.FirstName}", | ||
"{Name.FirstName} {Name.LastName}" | ||
}; | ||
} | ||
} |
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
Oops, something went wrong.