It seems that I found it, years ago I was looking to create a cross platform composite application in silverlight, its seems that now I will be able to have it and create it with Silverlight 2.0 and Prism (WPF composite application block) thanks to Contribute extension of Prism.
Patterns & Practices: Prism Contrib - Home
Tuesday, 13 May 2008
Unity Dependency Injection IoC Screencast
David Hayden presents here the new Unity Dependency Injection, which highlights:
UnityContainer Resolve and BuildUp Methods
UnityContainer RegisterType and RegisterInstance Methods
UnityConfigurationSection for Web.config and App.config
ASP.NET MVC Framework. ASP.NET Model View Presenter Pattern.
If you are currently using Dependency Injection this is a pretty good alternative, I do like the ability to define the Registration type for Singleton, resolve properties without the need to decorate them, and from the screencast I like both examples for MVC and MVP.
UnityContainer Resolve and BuildUp Methods
UnityContainer RegisterType and RegisterInstance Methods
UnityConfigurationSection for Web.config and App.config
ASP.NET MVC Framework. ASP.NET Model View Presenter Pattern.
If you are currently using Dependency Injection this is a pretty good alternative, I do like the ability to define the Registration type for Singleton, resolve properties without the need to decorate them, and from the screencast I like both examples for MVC and MVP.
Monday, 3 March 2008
AD When does my Password Expire?
We are implementing a new password policy and we want to show users when is their password to expire. (Something simple I know...).
Well with a bit of googling I have found this great post by Ryan Dunn
Using the PasswordExpires class from the post, and a bit of refactoring on the main class we can quickly get our personalize expiry page:
protected void Page_Load(object sender, EventArgs e)
{
PasswordExpires pe = new PasswordExpires();
string[] a = Context.User.Identity.Name.Split('\\');
string userName = a[1];
Response.Write(String.Format("Password Policy: {0} days", 0 - pe.PasswordAge.Days));
Response.Write("
");
TimeSpan t = pe.WhenExpires(userName);
if (t == TimeSpan.MaxValue)
Response.Write(String.Format("{0}: Password Never Expires", userName));
else if (t == TimeSpan.MinValue)
Response.Write(String.Format("{0}: Password Expired", userName));
else
Response.Write(
String.Format("Password for {0} expires in {1} days at {2}", userName, t.Days, DateTime.Now.Add(t)));
}
Well with a bit of googling I have found this great post by Ryan Dunn
Using the PasswordExpires class from the post, and a bit of refactoring on the main class we can quickly get our personalize expiry page:
protected void Page_Load(object sender, EventArgs e)
{
PasswordExpires pe = new PasswordExpires();
string[] a = Context.User.Identity.Name.Split('\\');
string userName = a[1];
Response.Write(String.Format("Password Policy: {0} days", 0 - pe.PasswordAge.Days));
Response.Write("
");
TimeSpan t = pe.WhenExpires(userName);
if (t == TimeSpan.MaxValue)
Response.Write(String.Format("{0}: Password Never Expires", userName));
else if (t == TimeSpan.MinValue)
Response.Write(String.Format("{0}: Password Expired", userName));
else
Response.Write(
String.Format("Password for {0} expires in {1} days at {2}", userName, t.Days, DateTime.Now.Add(t)));
}
Subscribe to:
Posts (Atom)