示例#1
0
        //
        // Load/Store implementation
        //

        //
        // Loading with query results
        //
        internal override void LoadValueIntoProperty(string propertyName, object value)
        {
            GlobalDebug.WriteLineIf(GlobalDebug.Info, "Computer", "LoadValueIntoProperty: name=" + propertyName + " value=" + (value == null ? "null" : value.ToString()));

            switch (propertyName)
            {
            case (PropertyNames.ComputerServicePrincipalNames):
                _servicePrincipalNames.Load((List <string>)value);
                _servicePrincipalNamesLoaded = LoadState.Loaded;
                break;

            default:
                base.LoadValueIntoProperty(propertyName, value);
                break;
            }
        }
示例#2
0
        //
        // Load/Store
        //

        //
        // Loading with query results
        //

        internal void LoadValueIntoProperty(string propertyName, object value)
        {
            //            GlobalDebug.WriteLineIf(GlobalDebug.Info, "AccountInfo", "LoadValueIntoProperty: name=" + propertyName + " value=" + value.ToString());

            switch (propertyName)
            {
            case (PropertyNames.AcctInfoAcctLockoutTime):
                _accountLockoutTime       = (Nullable <DateTime>)value;
                _accountLockoutTimeLoaded = LoadState.Loaded;
                break;

            case (PropertyNames.AcctInfoLastLogon):
                _lastLogon       = (Nullable <DateTime>)value;
                _lastLogonLoaded = LoadState.Loaded;
                break;

            case (PropertyNames.AcctInfoPermittedWorkstations):
                _permittedWorkstations.Load((List <string>)value);
                _permittedWorkstationsLoaded = LoadState.Loaded;
                break;

            case (PropertyNames.AcctInfoPermittedLogonTimes):
                _permittedLogonTimes         = (byte[])value;
                _permittedLogonTimesOriginal = (byte[])((byte[])value).Clone();
                _permittedLogonTimesLoaded   = LoadState.Loaded;
                break;

            case (PropertyNames.AcctInfoExpirationDate):
                _expirationDate        = (Nullable <DateTime>)value;
                _expirationDateChanged = LoadState.Loaded;
                break;

            case (PropertyNames.AcctInfoSmartcardRequired):
                _smartcardLogonRequired        = (bool)value;
                _smartcardLogonRequiredChanged = LoadState.Loaded;
                break;

            case (PropertyNames.AcctInfoDelegationPermitted):
                _delegationPermitted        = (bool)value;
                _delegationPermittedChanged = LoadState.Loaded;
                break;

            case (PropertyNames.AcctInfoBadLogonCount):
                _badLogonCount        = (int)value;
                _badLogonCountChanged = LoadState.Loaded;
                break;

            case (PropertyNames.AcctInfoHomeDirectory):
                _homeDirectory        = (string)value;
                _homeDirectoryChanged = LoadState.Loaded;
                break;

            case (PropertyNames.AcctInfoHomeDrive):
                _homeDrive        = (string)value;
                _homeDriveChanged = LoadState.Loaded;
                break;

            case (PropertyNames.AcctInfoScriptPath):
                _scriptPath        = (string)value;
                _scriptPathChanged = LoadState.Loaded;
                break;

            default:
                Debug.Fail($"AccountInfo.LoadValueIntoProperty: fell off end looking for {propertyName}");
                break;
            }
        }
示例#3
0
 static public void ValueCollectionLoad <T>(PrincipalValueCollection <T> trackList, List <T> initial)
 {
     trackList.Load(initial);
 }