Refactored the Kernel registration fluent interface to be more readable, better suppo...
[castle.git] / InversionOfControl / Castle.Windsor.Tests / Components / Employee.cs
bloba54b878394a729891b2c11a82aef72d7086adc53
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.Windsor.Tests.Components
17 using System;
19 /// <summary>
20 /// Summary description for Employee.
21 /// </summary>
22 public class Employee : IEmployee
24 private string _empID;
25 private string _lastName;
26 private string _firstName;
27 private string _middleName;
28 private bool _isProxy;
29 private bool _isSupervisor;
30 private string _email;
31 private string _ntLogin;
33 public Employee()
37 public string EmployeeID
39 get { return _empID; }
40 set { _empID = value; }
43 public string NTLogin
45 get
47 if (_ntLogin.Length > 0)
49 return _ntLogin;
52 try
54 // if (Config.IsInPortal)
55 // {
56 // _ntLogin = User.FindLoginIdFromEmpId(_empID);
57 // }
58 // else
59 // {
60 // _ntLogin = Config.DebugNtLogin;
61 // }
63 return _ntLogin;
65 catch(Exception)
67 // Logger.Error("NTLogin check failed.", e);
68 // Logger.SendMail("ERROR", "NTLogin check failed.", e);
69 return null;
74 public string LastName
76 get { return _lastName; }
77 set { _lastName = value; }
80 public string FirstName
82 get { return _firstName; }
83 set { _firstName = value; }
86 public string MiddleName
88 get { return _middleName; }
89 set { _middleName = value; }
92 public bool IsProxy
94 get { return _isProxy; }
95 set { _isProxy = value; }
98 public string FullName
100 get { return String.Format("{0} {1} {2}", _firstName, _middleName, _lastName); }
103 public string Email
105 get { return _email; }
106 set { _email = value; }
109 public bool IsSupervisor
111 get { return _isSupervisor; }
112 set { _isSupervisor = value; }
115 public void SetNTLogin(string ntLogin)
117 _ntLogin = ntLogin;