-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCookie.cs
36 lines (31 loc) · 912 Bytes
/
Cookie.cs
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
namespace Firebase.AuthTest.Models
{
using GraphQL.AspNet.Attributes;
/// <summary>
/// A scrumptious cookie!
/// </summary>
public class Cookie
{
public Cookie(string name, string flavor)
{
this.Name = name;
this.Flavor = flavor;
}
/// <summary>
/// Clones the cookie and assigns the id of the user this new cookie was
/// specifically made for.
/// </summary>
/// <param name="userId">The user identifier.</param>
/// <returns>Cookie.</returns>
[GraphSkip]
public Cookie MadeFor(string userId)
{
var clone = new Cookie(this.Name, this.Flavor);
clone.Owner = userId;
return clone;
}
public string Owner { get; private set; }
public string Name { get; }
public string Flavor { get; }
}
}