/// <summary>
        /// 得到某个Schema角色在管理单元下的角色ID
        /// </summary>
        /// <param name="auCodeName"></param>
        /// <returns></returns>
        public ClientAURole GetAURoleObject(string auCodeName)
        {
            ClientAURole result = null;

            if (auCodeName.IsNotEmpty())
            {
                lock (this._ClientAUSyncObject)
                {
                    if (this._LastestAUCodeName != auCodeName)
                    {
                        ClientSchemaObjectBase au = AUCenterQueryService.Instance.GetObjectsByCodeNames(new string[] { auCodeName }, WrappedAUSchemaRole.AUSchemaType, true).FirstOrDefault();

                        if (au != null)
                            this._ClientRoleObject = AUCenterQueryService.Instance.GetAURoleBySchemaRoleID(au.ID, this.SchemaRoleID, true);
                        else
                            this._ClientRoleObject = null;

                        result = this._ClientRoleObject;
                        this._LastestAUCodeName = auCodeName;
                    }
                    else
                        result = this._ClientRoleObject;
                }
            }

            return result;
        }
		public void AddAdminUnitWithMembers(ClientAdminUnit unit, ClientAdminUnit parent, ClientAURole[] roles, ClientAUAdminScope[] scopes)
		{
			roles.NullCheck("roles");
			scopes.NullCheck("scopes");
			CheckIDProvided(unit);

			AURole[] auRoles = new AURole[roles.Length];
			for (int i = roles.Length - 1; i >= 0; i--)
				auRoles[i] = (AURole)roles[i].ToSchemaObject();

			AUAdminScope[] auScopes = new AUAdminScope[scopes.Length];
			for (int i = scopes.Length - 1; i >= 0; i--)
				auScopes[i] = (AUAdminScope)scopes[i].ToSchemaObject();

			EnsureID(unit);
			AdminUnit auParent = parent != null ? (AdminUnit)parent.ToSchemaObject(true) : null;

			this.Facade.AddAdminUnitWithMembers((AdminUnit)unit.ToSchemaObject(false), auParent, auRoles, auScopes);
		}