Пример #1
0
 public XElement ToXml(bool encrypt = false)
 {
     return
         (new XElement("ConnectionStrings",
                       new XElement("add",
                                    new XAttribute("name", encrypt ? Name.Encrypt() : Name),
                                    new XAttribute("publicKeyToken", Id),
                                    new XAttribute("description", Description ?? "Empty"),
                                    new XAttribute("connectionString", encrypt ? "#" + ConnectionString.Encrypt() : ConnectionString),
                                    new XAttribute("providerName", encrypt ? ProviderName.Encrypt() : ProviderName))));
 }