mRemoteNG.Config.Serializers.XmlConnectionNodeSerializer.SetInheritanceAttributes C# (CSharp) Method

SetInheritanceAttributes() private method

private SetInheritanceAttributes ( System.Xml.Linq.XContainer element, IInheritable connectionInfo ) : void
element System.Xml.Linq.XContainer
connectionInfo IInheritable
return void
        private void SetInheritanceAttributes(XContainer element, IInheritable connectionInfo)
        {
            if (_saveFilter.SaveInheritance)
            {
                element.Add(new XAttribute("InheritCacheBitmaps", connectionInfo.Inheritance.CacheBitmaps.ToString()));
                element.Add(new XAttribute("InheritColors", connectionInfo.Inheritance.Colors.ToString()));
                element.Add(new XAttribute("InheritDescription", connectionInfo.Inheritance.Description.ToString()));
                element.Add(new XAttribute("InheritDisplayThemes", connectionInfo.Inheritance.DisplayThemes.ToString()));
                element.Add(new XAttribute("InheritDisplayWallpaper", connectionInfo.Inheritance.DisplayWallpaper.ToString()));
                element.Add(new XAttribute("InheritEnableFontSmoothing", connectionInfo.Inheritance.EnableFontSmoothing.ToString()));
                element.Add(new XAttribute("InheritEnableDesktopComposition", connectionInfo.Inheritance.EnableDesktopComposition.ToString()));
                element.Add(new XAttribute("InheritDomain", connectionInfo.Inheritance.Domain.ToString()));
                element.Add(new XAttribute("InheritIcon", connectionInfo.Inheritance.Icon.ToString()));
                element.Add(new XAttribute("InheritPanel", connectionInfo.Inheritance.Panel.ToString()));
                element.Add(new XAttribute("InheritPassword", connectionInfo.Inheritance.Password.ToString()));
                element.Add(new XAttribute("InheritPort", connectionInfo.Inheritance.Port.ToString()));
                element.Add(new XAttribute("InheritProtocol", connectionInfo.Inheritance.Protocol.ToString()));
                element.Add(new XAttribute("InheritPuttySession", connectionInfo.Inheritance.PuttySession.ToString()));
                element.Add(new XAttribute("InheritRedirectDiskDrives", connectionInfo.Inheritance.RedirectDiskDrives.ToString()));
                element.Add(new XAttribute("InheritRedirectKeys", connectionInfo.Inheritance.RedirectKeys.ToString()));
                element.Add(new XAttribute("InheritRedirectPorts", connectionInfo.Inheritance.RedirectPorts.ToString()));
                element.Add(new XAttribute("InheritRedirectPrinters", connectionInfo.Inheritance.RedirectPrinters.ToString()));
                element.Add(new XAttribute("InheritRedirectSmartCards", connectionInfo.Inheritance.RedirectSmartCards.ToString()));
                element.Add(new XAttribute("InheritRedirectSound", connectionInfo.Inheritance.RedirectSound.ToString()));
                element.Add(new XAttribute("InheritSoundQuality", connectionInfo.Inheritance.SoundQuality.ToString()));
                element.Add(new XAttribute("InheritResolution", connectionInfo.Inheritance.Resolution.ToString()));
                element.Add(new XAttribute("InheritAutomaticResize", connectionInfo.Inheritance.AutomaticResize.ToString()));
                element.Add(new XAttribute("InheritUseConsoleSession", connectionInfo.Inheritance.UseConsoleSession.ToString()));
                element.Add(new XAttribute("InheritUseCredSsp", connectionInfo.Inheritance.UseCredSsp.ToString()));
                element.Add(new XAttribute("InheritRenderingEngine", connectionInfo.Inheritance.RenderingEngine.ToString()));
                element.Add(new XAttribute("InheritUsername", connectionInfo.Inheritance.Username.ToString()));
                element.Add(new XAttribute("InheritICAEncryptionStrength", connectionInfo.Inheritance.ICAEncryptionStrength.ToString()));
                element.Add(new XAttribute("InheritRDPAuthenticationLevel", connectionInfo.Inheritance.RDPAuthenticationLevel.ToString()));
                element.Add(new XAttribute("InheritLoadBalanceInfo", connectionInfo.Inheritance.LoadBalanceInfo.ToString()));
                element.Add(new XAttribute("InheritPreExtApp", connectionInfo.Inheritance.PreExtApp.ToString()));
                element.Add(new XAttribute("InheritPostExtApp", connectionInfo.Inheritance.PostExtApp.ToString()));
                element.Add(new XAttribute("InheritMacAddress", connectionInfo.Inheritance.MacAddress.ToString()));
                element.Add(new XAttribute("InheritUserField", connectionInfo.Inheritance.UserField.ToString()));
                element.Add(new XAttribute("InheritExtApp", connectionInfo.Inheritance.ExtApp.ToString()));
                element.Add(new XAttribute("InheritVNCCompression", connectionInfo.Inheritance.VNCCompression.ToString()));
                element.Add(new XAttribute("InheritVNCEncoding", connectionInfo.Inheritance.VNCEncoding.ToString()));
                element.Add(new XAttribute("InheritVNCAuthMode", connectionInfo.Inheritance.VNCAuthMode.ToString()));
                element.Add(new XAttribute("InheritVNCProxyType", connectionInfo.Inheritance.VNCProxyType.ToString()));
                element.Add(new XAttribute("InheritVNCProxyIP", connectionInfo.Inheritance.VNCProxyIP.ToString()));
                element.Add(new XAttribute("InheritVNCProxyPort", connectionInfo.Inheritance.VNCProxyPort.ToString()));
                element.Add(new XAttribute("InheritVNCProxyUsername", connectionInfo.Inheritance.VNCProxyUsername.ToString()));
                element.Add(new XAttribute("InheritVNCProxyPassword", connectionInfo.Inheritance.VNCProxyPassword.ToString()));
                element.Add(new XAttribute("InheritVNCColors", connectionInfo.Inheritance.VNCColors.ToString()));
                element.Add(new XAttribute("InheritVNCSmartSizeMode", connectionInfo.Inheritance.VNCSmartSizeMode.ToString()));
                element.Add(new XAttribute("InheritVNCViewOnly", connectionInfo.Inheritance.VNCViewOnly.ToString()));
                element.Add(new XAttribute("InheritRDGatewayUsageMethod", connectionInfo.Inheritance.RDGatewayUsageMethod.ToString()));
                element.Add(new XAttribute("InheritRDGatewayHostname", connectionInfo.Inheritance.RDGatewayHostname.ToString()));
                element.Add(new XAttribute("InheritRDGatewayUseConnectionCredentials", connectionInfo.Inheritance.RDGatewayUseConnectionCredentials.ToString()));
                element.Add(new XAttribute("InheritRDGatewayUsername", connectionInfo.Inheritance.RDGatewayUsername.ToString()));
                element.Add(new XAttribute("InheritRDGatewayPassword", connectionInfo.Inheritance.RDGatewayPassword.ToString()));
                element.Add(new XAttribute("InheritRDGatewayDomain", connectionInfo.Inheritance.RDGatewayDomain.ToString()));
            }
            else
            {
                element.Add(new XAttribute("InheritCacheBitmaps", false.ToString()));
                element.Add(new XAttribute("InheritColors", false.ToString()));
                element.Add(new XAttribute("InheritDescription", false.ToString()));
                element.Add(new XAttribute("InheritDisplayThemes", false.ToString()));
                element.Add(new XAttribute("InheritDisplayWallpaper", false.ToString()));
                element.Add(new XAttribute("InheritEnableFontSmoothing", false.ToString()));
                element.Add(new XAttribute("InheritEnableDesktopComposition", false.ToString()));
                element.Add(new XAttribute("InheritDomain", false.ToString()));
                element.Add(new XAttribute("InheritIcon", false.ToString()));
                element.Add(new XAttribute("InheritPanel", false.ToString()));
                element.Add(new XAttribute("InheritPassword", false.ToString()));
                element.Add(new XAttribute("InheritPort", false.ToString()));
                element.Add(new XAttribute("InheritProtocol", false.ToString()));
                element.Add(new XAttribute("InheritPuttySession", false.ToString()));
                element.Add(new XAttribute("InheritRedirectDiskDrives", false.ToString()));
                element.Add(new XAttribute("InheritRedirectKeys", false.ToString()));
                element.Add(new XAttribute("InheritRedirectPorts", false.ToString()));
                element.Add(new XAttribute("InheritRedirectPrinters", false.ToString()));
                element.Add(new XAttribute("InheritRedirectSmartCards", false.ToString()));
                element.Add(new XAttribute("InheritRedirectSound", false.ToString()));
                element.Add(new XAttribute("InheritSoundQuality", false.ToString()));
                element.Add(new XAttribute("InheritResolution", false.ToString()));
                element.Add(new XAttribute("InheritAutomaticResize", false.ToString()));
                element.Add(new XAttribute("InheritUseConsoleSession", false.ToString()));
                element.Add(new XAttribute("InheritUseCredSsp", false.ToString()));
                element.Add(new XAttribute("InheritRenderingEngine", false.ToString()));
                element.Add(new XAttribute("InheritUsername", false.ToString()));
                element.Add(new XAttribute("InheritICAEncryptionStrength", false.ToString()));
                element.Add(new XAttribute("InheritRDPAuthenticationLevel", false.ToString()));
                element.Add(new XAttribute("InheritLoadBalanceInfo", false.ToString()));
                element.Add(new XAttribute("InheritPreExtApp", false.ToString()));
                element.Add(new XAttribute("InheritPostExtApp", false.ToString()));
                element.Add(new XAttribute("InheritMacAddress", false.ToString()));
                element.Add(new XAttribute("InheritUserField", false.ToString()));
                element.Add(new XAttribute("InheritExtApp", false.ToString()));
                element.Add(new XAttribute("InheritVNCCompression", false.ToString()));
                element.Add(new XAttribute("InheritVNCEncoding", false.ToString()));
                element.Add(new XAttribute("InheritVNCAuthMode", false.ToString()));
                element.Add(new XAttribute("InheritVNCProxyType", false.ToString()));
                element.Add(new XAttribute("InheritVNCProxyIP", false.ToString()));
                element.Add(new XAttribute("InheritVNCProxyPort", false.ToString()));
                element.Add(new XAttribute("InheritVNCProxyUsername", false.ToString()));
                element.Add(new XAttribute("InheritVNCProxyPassword", false.ToString()));
                element.Add(new XAttribute("InheritVNCColors", false.ToString()));
                element.Add(new XAttribute("InheritVNCSmartSizeMode", false.ToString()));
                element.Add(new XAttribute("InheritVNCViewOnly", false.ToString()));
                element.Add(new XAttribute("InheritRDGatewayUsageMethod", false.ToString()));
                element.Add(new XAttribute("InheritRDGatewayHostname", false.ToString()));
                element.Add(new XAttribute("InheritRDGatewayUseConnectionCredentials", false.ToString()));
                element.Add(new XAttribute("InheritRDGatewayUsername", false.ToString()));
                element.Add(new XAttribute("InheritRDGatewayPassword", false.ToString()));
                element.Add(new XAttribute("InheritRDGatewayDomain", false.ToString()));
            }
        }