Exemplo n.º 1
0
        public ISecurityOptions Copy()
        {
            var copy = new SecurityOptions {
                Credential = this.Credential
            };

            copy.UpdateFrom(this);
            return(copy);
        }
Exemplo n.º 2
0
        private void UpdatePasswordsInProtocolProperties(ProtocolOptions protocolProperties, string newKeyMaterial)
        {
            var options = protocolProperties as IContainsCredentials;

            if (options != null)
            {
                SecurityOptions securityOptions = options.GetSecurity();
                var             guarded         = this.CreateGuardedSecurity(securityOptions);
                guarded.UpdatePasswordByNewKeyMaterial(newKeyMaterial);
            }
        }
Exemplo n.º 3
0
        private void UpdateFrom(Favorite source)
        {
            // we do not call AssignStores here, because they will be copied together with the child properties
            this.groups               = source.groups;
            this.DesktopShare         = source.DesktopShare;
            this.Display              = source.Display.Copy();
            this.ExecuteBeforeConnect = source.ExecuteBeforeConnect.Copy();
            this.Name            = source.Name;
            this.NewWindow       = source.NewWindow;
            this.Notes           = source.Notes;
            this.Port            = source.Port;
            this.Protocol        = source.Protocol;
            this.security        = (SecurityOptions)source.security.Copy();
            this.ServerName      = source.ServerName;
            this.ToolBarIconFile = source.ToolBarIconFile;

            this.ProtocolProperties = source.ProtocolProperties.Copy();
        }
 internal SecurityOptions Copy()
 {
     var copy = new SecurityOptions{ Credential = this.Credential };
     copy.UpdateFrom(this);
     return copy;
 }
Exemplo n.º 5
0
 private GuardedSecurity CreateGuardedSecurity(SecurityOptions favoriteSecurity)
 {
     return(new GuardedSecurity(this.persistence, favoriteSecurity));
 }