Exemplo n.º 1
0
		public ComputerPrincipal(PrincipalContext context) : base(context)
		{
			this.servicePrincipalNames = new PrincipalValueCollection<string>();
			if (context != null)
			{
				if (base.Context.ContextType != ContextType.ApplicationDirectory || !(base.GetType() == typeof(ComputerPrincipal)))
				{
					base.ContextRaw = context;
					this.unpersisted = true;
					return;
				}
				else
				{
					throw new InvalidOperationException(StringResources.ComputerInvalidForAppDirectoryStore);
				}
			}
			else
			{
				throw new ArgumentException(StringResources.NullArguments);
			}
		}
Exemplo n.º 2
0
		internal AccountInfo(AuthenticablePrincipal principal)
		{
			this.accountLockoutTime = null;
			this.lastLogon = null;
			this.permittedWorkstations = new PrincipalValueCollection<string>();
			this.expirationDate = null;
			this.owningPrincipal = principal;
		}