public AzureUserAccess(AzureUser user, string ip, string userAgent, string reason, DateTimeOffset when) { var rowKey = String.IsNullOrEmpty(user.RowKey) ? String.Empty : user.RowKey + "|"; rowKey += when.ToString("yyyy-MM-ddTHH-mm-ss"); this.PartitionKey = user.PartitionKey; this.RowKey = "access|" + rowKey; this.IP = ip; this.UserAgent = userAgent; this.Reason = reason; this.When = when; }
private static AzureUserReference CreateUserNameReference(AzureUser user) { if (String.IsNullOrEmpty(user.NormalizedUserName)) { return(null); } var referenceKey = AzureUserReferenceKey.ForUsername(user.NormalizedUserName); return(new AzureUserReference(referenceKey, user.Id) { ETag = "*" }); }