12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System;
- namespace Wayne.ForecourtControl
- {
-
-
-
- public static class ForecourtControlXml
- {
- #region Fields
- private static System.Xml.Schema.XmlSchema schema;
- #endregion
- #region Properties
-
-
-
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", MessageId = "Member")]
- public const string Ns = "http://www.wayne.com/2006-08-14/ForecourtControl.xsd";
- #endregion
- #region Methods
-
-
-
-
- public static void AddSchemas(System.Xml.Schema.XmlSchemaSet xmlSchemaSet)
- {
- schema = null;
- if (schema == null)
- {
- string schemaName = "Wayne.ForecourtControl.ForecourtControl.xsd";
- using (var stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(schemaName))
- {
- schema = System.Xml.Schema.XmlSchema.Read(stream, null);
- }
- if (schema == null)
- throw new NullReferenceException(string.Format(System.Globalization.CultureInfo.InvariantCulture, "Embedded resource XML-schema \"{0}\" not found!", ForecourtControlXml.Ns));
- }
- if (xmlSchemaSet != null)
- {
- if (!xmlSchemaSet.Contains(schema.TargetNamespace))
- xmlSchemaSet.Add(schema);
- }
- }
- #endregion
- }
- }
|