internal void ResetAllChangeStatus() { LoadState loadState; LoadState loadState1; LoadState loadState2; LoadState loadState3; PasswordInfo passwordInfo = this; if (this.passwordNotRequiredChanged == LoadState.Changed) { loadState = LoadState.Loaded; } else { loadState = LoadState.NotSet; } passwordInfo.passwordNotRequiredChanged = loadState; PasswordInfo passwordInfo1 = this; if (this.passwordNeverExpiresChanged == LoadState.Changed) { loadState1 = LoadState.Loaded; } else { loadState1 = LoadState.NotSet; } passwordInfo1.passwordNeverExpiresChanged = loadState1; PasswordInfo passwordInfo2 = this; if (this.cannotChangePasswordChanged == LoadState.Changed) { loadState2 = LoadState.Loaded; } else { loadState2 = LoadState.NotSet; } passwordInfo2.cannotChangePasswordChanged = loadState2; PasswordInfo passwordInfo3 = this; if (this.allowReversiblePasswordEncryptionChanged == LoadState.Changed) { loadState3 = LoadState.Loaded; } else { loadState3 = LoadState.NotSet; } passwordInfo3.allowReversiblePasswordEncryptionChanged = loadState3; this.storedNewPassword = null; this.expirePasswordImmediately = false; }
internal override void LoadValueIntoProperty(string propertyName, object value) { string str = propertyName; string str1 = str; if (str != null) { if (str1 == "AuthenticablePrincipal.Certificates") { this.LoadCertificateCollection((List <byte[]>)value); this.RefreshOriginalThumbprintList(); this.X509Certificate2CollectionLoaded = LoadState.Loaded; return; } else { if (str1 == "AuthenticablePrincipal.Enabled") { this.enabled = (bool)value; this.enabledChanged = LoadState.Loaded; return; } } } if (!propertyName.StartsWith("AuthenticablePrincipal.AccountInfo", StringComparison.Ordinal)) { if (!propertyName.StartsWith("AuthenticablePrincipal.PasswordInfo", StringComparison.Ordinal)) { base.LoadValueIntoProperty(propertyName, value); return; } else { if (this.passwordInfo == null) { this.passwordInfo = new PasswordInfo(this); } this.passwordInfo.LoadValueIntoProperty(propertyName, value); return; } } else { if (this.accountInfo == null) { this.accountInfo = new AccountInfo(this); } this.accountInfo.LoadValueIntoProperty(propertyName, value); return; } }
// // 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; } }
static public void PIResetChanges(PasswordInfo pi) { pi.ResetAllChangeStatus(); }
static public object PIGetValue(PasswordInfo pi, string name) { return(pi.GetValueForProperty(name)); }
static public bool PIGetChangeStatus(PasswordInfo pi, string name) { return(pi.GetChangeStatusForProperty(name)); }
static public void PILoadValue(PasswordInfo pi, string name, object value) { pi.LoadValueIntoProperty(name, value); }