using System.Collections.Generic;
using System.Xml.Serialization;
using System.Diagnostics;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Text.RegularExpressions;
using System.Globalization;
using System.ComponentModel.DataAnnotations;
using System.Collections;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.33440")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(TypeName="END-TO-END-PROTECTION-VARIABLE-PROTOTYPE", Namespace="http://autosar.org/schema/r4.0")]
public partial class ENDTOENDPROTECTIONVARIABLEPROTOTYPE {
[System.Xml.Serialization.XmlArrayAttribute("RECEIVER-IREFS", Order=0)]
[System.Xml.Serialization.XmlArrayItemAttribute("RECEIVER-IREF", IsNullable=false)]
public VARIABLEDATAPROTOTYPEINSYSTEMINSTANCEREF[] RECEIVERIREFS;
[System.Xml.Serialization.XmlAttributeAttribute()]
[System.Xml.Serialization.XmlElementAttribute("SENDER-IREF", Order=1)]
public VARIABLEDATAPROTOTYPEINSYSTEMINSTANCEREF SENDERIREF;
[System.Xml.Serialization.XmlElementAttribute("SHORT-LABEL", Order=2)]
public IDENTIFIER SHORTLABEL;
[System.Xml.Serialization.XmlAttributeAttribute()]
[System.Xml.Serialization.XmlElementAttribute("VARIATION-POINT", Order=3)]
public VARIATIONPOINT VARIATIONPOINT;
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.33440")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(TypeName="VARIABLE-DATA-PROTOTYPE-IN-SYSTEM-INSTANCE-REF", Namespace="http://autosar.org/schema/r4.0")]
public partial class VARIABLEDATAPROTOTYPEINSYSTEMINSTANCEREF {
[System.Xml.Serialization.XmlElementAttribute("CONTEXT-COMPONENT-REF", Order=0)]
public VARIABLEDATAPROTOTYPEINSYSTEMINSTANCEREFCONTEXTCOMPONENTREF[] CONTEXTCOMPONENTREF;
[System.Xml.Serialization.XmlElementAttribute("CONTEXT-COMPOSITION-REF", Order=1)]
public VARIABLEDATAPROTOTYPEINSYSTEMINSTANCEREFCONTEXTCOMPOSITIONREF CONTEXTCOMPOSITIONREF;
[System.Xml.Serialization.XmlElementAttribute("CONTEXT-PORT-REF", Order=2)]
public VARIABLEDATAPROTOTYPEINSYSTEMINSTANCEREFCONTEXTPORTREF CONTEXTPORTREF;
[System.Xml.Serialization.XmlAttributeAttribute()]
[System.Xml.Serialization.XmlAttributeAttribute()]
[System.Xml.Serialization.XmlElementAttribute("TARGET-DATA-PROTOTYPE-REF", Order=3)]
public VARIABLEDATAPROTOTYPEINSYSTEMINSTANCEREFTARGETDATAPROTOTYPEREF TARGETDATAPROTOTYPEREF;
public static void Test()
var root = new ENDTOENDPROTECTIONVARIABLEPROTOTYPE
T = "2017-07-31T13:37:48Z",
new VARIABLEDATAPROTOTYPEINSYSTEMINSTANCEREF
T = "2017-07-31T13:37:48Z",
var xml2 = root.GetXml(true);
public class AssertionFailedException : System.Exception
public AssertionFailedException() : base() { }
public AssertionFailedException(string s) : base(s) { }
public static class Assert
public static void IsTrue(bool value)
public static void IsTrue(bool value, string message)
throw new AssertionFailedException(message ?? "failed");
public static class XmlSerializationHelper
public static T LoadFromXml<T>(this string xmlString, XmlSerializer serial = null)
serial = serial ?? new XmlSerializer(typeof(T));
T returnValue = default(T);
using (StringReader reader = new StringReader(xmlString))
object result = serial.Deserialize(reader);
public static string GetXml<T>(this T obj, bool omitStandardNamespaces)
return obj.GetXml(null, omitStandardNamespaces);
public static string GetXml<T>(this T obj, XmlSerializer serializer = null, bool omitStandardNamespaces = false)
XmlSerializerNamespaces ns = null;
if (omitStandardNamespaces)
ns = new XmlSerializerNamespaces();
using (var textWriter = new StringWriter())
var settings = new XmlWriterSettings() { Indent = true };
using (var xmlWriter = XmlWriter.Create(textWriter, settings))
(serializer ?? new XmlSerializer(obj.GetType())).Serialize(xmlWriter, obj, ns);
return textWriter.ToString();
public static void Main()
Console.WriteLine("Environment version: " + Environment.Version);