generated from PepperDash/EssentialsPluginTemplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: testing debugging config ui extensions
- Loading branch information
1 parent
c86899f
commit 11e9065
Showing
9 changed files
with
2,848 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
using System.IO; | ||
using System.Xml; | ||
using System.Xml.Serialization; | ||
|
||
namespace epi_videoCodec_ciscoExtended.Xml | ||
{ | ||
public class XmlConverter | ||
{ | ||
public static string SerializeObject<T>(T toSerialize) | ||
{ | ||
XmlSerializer xmlSerializer = new XmlSerializer(typeof(T)); | ||
using (StringWriter textWriter = new StringWriter()) | ||
{ | ||
xmlSerializer.Serialize(textWriter, toSerialize); | ||
return textWriter.ToString(); | ||
} | ||
} | ||
} | ||
public static class XmlConverter | ||
{ | ||
public static string SerializeObject<T>(T value) | ||
{ | ||
var emptyNamespaces = new XmlSerializerNamespaces(new[] { XmlQualifiedName.Empty }); | ||
var serializer = new XmlSerializer(value.GetType()); | ||
var settings = new XmlWriterSettings | ||
{ | ||
OmitXmlDeclaration = true, // Do not include XML declaration | ||
Indent = true, // Indent XML for readability | ||
}; | ||
|
||
using (var stream = new StringWriter()) | ||
using (var writer = XmlWriter.Create(stream, settings)) | ||
{ | ||
serializer.Serialize(writer, value, emptyNamespaces); | ||
return stream.ToString(); | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters