コード例 #1
0
ファイル: ShellProfile.cs プロジェクト: xcbat/FluentTerminal
 public ShellProfile(ShellProfile other)
 {
     Id               = other.Id;
     PreInstalled     = other.PreInstalled;
     Name             = other.Name;
     Arguments        = other.Arguments;
     Location         = other.Location;
     WorkingDirectory = other.WorkingDirectory;
     TabThemeId       = other.TabThemeId;
     TerminalThemeId  = other.TerminalThemeId;
     KeyBindings      = other.KeyBindings.Select(x => new KeyBinding(x)).ToList();
 }
コード例 #2
0
 protected ShellProfile(ShellProfile other)
 {
     Id                    = other.Id;
     PreInstalled          = other.PreInstalled;
     Name                  = other.Name;
     Arguments             = other.Arguments;
     Location              = other.Location;
     WorkingDirectory      = other.WorkingDirectory;
     TabThemeId            = other.TabThemeId;
     TerminalThemeId       = other.TerminalThemeId;
     LineEndingTranslation = other.LineEndingTranslation;
     UseConPty             = other.UseConPty;
     KeyBindings           = other.KeyBindings.Select(x => new KeyBinding(x)).ToList();
 }
コード例 #3
0
ファイル: SshProfile.cs プロジェクト: vincetm/FluentTerminal
        public override bool EqualTo(ShellProfile other)
        {
            if (!(other is SshProfile otherSsh) || !base.EqualTo(other))
            {
                return(false);
            }

            if (ReferenceEquals(this, otherSsh))
            {
                return(true);
            }

            return(otherSsh.Host.NullableEqualTo(Host) &&
                   otherSsh.SshPort.Equals(SshPort) &&
                   otherSsh.Username.NullableEqualTo(Username) &&
                   otherSsh.IdentityFile.NullableEqualTo(IdentityFile) &&
                   otherSsh.UseMosh.Equals(UseMosh) &&
                   otherSsh.MoshPortFrom.Equals(MoshPortFrom) &&
                   otherSsh.MoshPortTo.Equals(MoshPortTo));
        }
コード例 #4
0
        public override bool EqualTo(ShellProfile other)
        {
            if (!(other is SshProfile otherSsh))
            {
                return(false);
            }

            if (ReferenceEquals(this, otherSsh))
            {
                return(true);
            }

            return(otherSsh.Id.Equals(Id) && string.Equals(otherSsh.Name, Name) && string.Equals(otherSsh.Host, Host) &&
                   otherSsh.SshPort.Equals(SshPort) && string.Equals(otherSsh.Username, Username) &&
                   (string.IsNullOrEmpty(IdentityFile)
                       ? string.IsNullOrEmpty(otherSsh.IdentityFile)
                       : string.Equals(otherSsh.IdentityFile, IdentityFile)) && otherSsh.UseMosh.Equals(UseMosh) &&
                   otherSsh.MoshPortFrom.Equals(MoshPortFrom) && otherSsh.MoshPortTo.Equals(MoshPortTo) &&
                   otherSsh.TabThemeId.Equals(TabThemeId) && otherSsh.TerminalThemeId.Equals(TerminalThemeId) &&
                   otherSsh.LineEndingTranslation == LineEndingTranslation && otherSsh.KeyBindings.SequenceEqual(KeyBindings));
        }
コード例 #5
0
        public virtual bool EqualTo(ShellProfile other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(other.Id.Equals(Id) &&
                   other.PreInstalled.Equals(PreInstalled) &&
                   other.Name.NullableEqualTo(Name) &&
                   other.Arguments.NullableEqualTo(Arguments) &&
                   other.Location.NullableEqualTo(Location) &&
                   other.WorkingDirectory.NullableEqualTo(WorkingDirectory) &&
                   other.TabThemeId.Equals(TabThemeId) &&
                   other.TerminalThemeId.Equals(TerminalThemeId) &&
                   other.UseConPty == UseConPty &&
                   other.KeyBindings.SequenceEqual(KeyBindings));
        }