aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/ICSharpCode.AvalonEdit/Highlighting/IHighlightingDefinitionReferenceResolver.cs
blob: 63ab09a077a7f6d28e4dfe92082d4a27026effbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)

using System;

namespace ICSharpCode.AvalonEdit.Highlighting
{
	/// <summary>
	/// Interface for resolvers that can solve cross-definition references.
	/// </summary>
	public interface IHighlightingDefinitionReferenceResolver
	{
		/// <summary>
		/// Gets the highlighting definition by name, or null if it is not found.
		/// </summary>
		IHighlightingDefinition GetDefinition(string name);
	}
}
Tango.MachineService.Filters; using Tango.MachineService.Models; using Tango.Web.Helpers; using System.Data.Entity; using Tango.Web.Storage; using System.IO; using Microsoft.WindowsAzure.Storage.Blob; using System.Net.Http; using System.Net; using System.Net.Http.Headers; using System.Net.Mime; using Tango.MachineService.Views.FSEAccount; namespace Tango.MachineService.Controllers { public class FSEAccountController : Controller { private static Random rnd = new Random(); public ActionResult ResetPassword(String id) { ResetPasswordVM vm = new ResetPasswordVM(); vm.FullName = "Full Name"; vm.Password = "Password"; var reset = FSEController.PendingPasswordResets.SingleOrDefault(x => x.ID == id); if (reset != null) { using (ObservablesContext db = ObservablesContextHelper.CreateContext()) { var user = db.Users.SingleOrDefault(x => x.Guid == reset.UserGuid); if (user != null) { String newPass = GenerateRandomPassword(); user.Password = Tango.BL.Entities.User.GetPasswordHash(newPass); user.PasswordChangeRequired = true; vm.Password = newPass; vm.FullName = reset.FullName; db.SaveChanges(); } } } return View(vm); } private String GenerateRandomPassword() { String pass = String.Empty; for (int i = 0; i < 4; i++) { pass += rnd.Next(0, 9).ToString(); } return pass; } } }