Ejemplo n.º 1
0
 public override void GoToState(ConfigLeafNode theLeafNode, LeafState nextState)
 {
     if (nextState == LeafState.DPAPIMACHINEEncrypted) return;
     string text = _isCommitted ? "<Reset Value>" : StringContent;
     switch (nextState)
     {
         case LeafState.DPAPIUSerEncrypted :
             theLeafNode.State = new DPAPIUserState(text);
             break;
         case LeafState.Plain:
             theLeafNode.State = new PlainLeafNodeState(text);
             break;
     }
 }
Ejemplo n.º 2
0
 public abstract void GoToState(ConfigLeafNode theLeafNode, LeafState nextState);
Ejemplo n.º 3
0
        public void GoToState(ConfigLeafNode theLeafNode, LeafState nextState)
        {
            if (nextState == LeafState.Plain) return;

            EncryptedLeafNodeState newState = null;

            if (nextState == LeafState.DPAPIMACHINEEncrypted)
            {
                newState = new DPAPIMachineState(StringContent);
            }

            if (nextState == LeafState.DPAPIUSerEncrypted)
            {
                newState = new DPAPIUserState(StringContent);
            }
            theLeafNode.State = newState;
        }