Exemplo n.º 1
0
        //
        // Load/Store
        //

        //
        // Loading with query results
        //

        internal override void LoadValueIntoProperty(string propertyName, object value)
        {
            switch (propertyName)
            {
            case PropertyNames.AuthenticablePrincipalCertificates:
                LoadCertificateCollection((List <byte[]>)value);
                RefreshOriginalThumbprintList();
                _X509Certificate2CollectionLoaded = LoadState.Loaded;
                break;

            case PropertyNames.AuthenticablePrincipalEnabled:
                _enabled        = (bool)value;
                _enabledChanged = LoadState.Loaded;
                break;

            default:
                if (propertyName.StartsWith(PropertyNames.AcctInfoPrefix, StringComparison.Ordinal))
                {
                    // If this is the first AccountInfo attribute we're loading,
                    // we'll need to create the AccountInfo to hold it
                    if (_accountInfo == null)
                    {
                        _accountInfo = new AccountInfo(this);
                    }

                    _accountInfo.LoadValueIntoProperty(propertyName, value);
                }
                else if (propertyName.StartsWith(PropertyNames.PwdInfoPrefix, StringComparison.Ordinal))
                {
                    // If this is the first PasswordInfo attribute we're loading,
                    // we'll need to create the PasswordInfo to hold it
                    if (_passwordInfo == null)
                    {
                        _passwordInfo = new PasswordInfo(this);
                    }

                    _passwordInfo.LoadValueIntoProperty(propertyName, value);
                }
                else
                {
                    base.LoadValueIntoProperty(propertyName, value);
                }
                break;
            }
        }
Exemplo n.º 2
0
 static public void AILoadValue(AccountInfo ai, string name, object value)
 {
     ai.LoadValueIntoProperty(name, value);
 }