forked from libgit2/libgit2sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIdentity.cs
More file actions
45 lines (40 loc) · 1.17 KB
/
Copy pathIdentity.cs
File metadata and controls
45 lines (40 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using LibGit2Sharp.Core;
namespace LibGit2Sharp
{
/// <summary>
/// Represents the identity used when writing reflog entries.
/// </summary>
public sealed class Identity
{
private readonly string _name;
private readonly string _email;
/// <summary>
/// Initializes a new instance of the <see cref="Identity"/> class.
/// </summary>
/// <param name="name">The name.</param>
/// <param name="email">The email.</param>
public Identity(string name, string email)
{
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNullOrEmptyString(email, "email");
Ensure.ArgumentDoesNotContainZeroByte(name, "name");
Ensure.ArgumentDoesNotContainZeroByte(name, "email");
_name = name;
_email = email;
}
/// <summary>
/// Gets the email.
/// </summary>
public string Email
{
get { return _email; }
}
/// <summary>
/// Gets the name.
/// </summary>
public string Name
{
get { return _name; }
}
}
}