src/Dsl.VS2017/GeneratedCode/SerializationHelper.cs
/// <summary>
/// Attempts to return the encoding used by the reader.
/// </summary>
/// <remarks>
/// The reader will be positioned at the start of the document when calling this method.
/// </remarks>
Attempts to return the encoding used by the reader.
Attempts to return the encoding used by the reader .
protected virtual bool TryGetEncoding(global::System.Xml.XmlReader reader, out global::System.Text.Encoding encoding)
		{
			global::System.Diagnostics.Debug.Assert(reader.NodeType == System.Xml.XmlNodeType.XmlDeclaration, "reader should be at the XmlDeclaration node when calling this method");
			encoding = null;
			if (reader.NodeType == global::System.Xml.XmlNodeType.XmlDeclaration)
			{
				string encodingName = reader.GetAttribute("encoding");
				if (!string.IsNullOrWhiteSpace(encodingName))
				{
					encoding = global::System.Text.Encoding.GetEncoding(encodingName);
					return true;
				}
			}
			return false;
		}
protected virtual bool TryGetEncoding ( global :: System . Xml . XmlReader reader , out global :: System . Text . Encoding encoding ) { global :: System . Diagnostics . Debug . Assert ( reader . NodeType == System . Xml . XmlNodeType . XmlDeclaration , " " ) ; encoding = null ; if ( reader . NodeType == global :: System . Xml . XmlNodeType . XmlDeclaration ) { string encodingName = reader . GetAttribute ( " " ) ; if ( ! string . IsNullOrWhiteSpace ( encodingName ) ) { encoding = global :: System . Text . Encoding . GetEncoding ( encodingName ) ; return true ; } } return false ; }
Attempts to return the encoding used by the reader.
Attempts to return the encoding used by the reader .
// Attempt to read and parse the "encoding" attribute from the XML declaration node
reader
global::System.Xml.XmlReader
global::System.Text.Encoding
out
remarks
The reader will be positioned at the start of the document when calling this method.
The reader will be positioned at the start of the document when calling this method .