//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:2.0.50727.4927
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace urn.nhibernate.configuration.Item2.Item2 {
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Diagnostics;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Linq;
using Xml.Schema.Linq;
///
///
/// Regular expression: (bytecodeprovider?, reflectionoptimizer?, sessionfactory?)
///
///
public partial class hibernateconfiguration : XTypedElement, IXMetaData {
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
static Dictionary localElementDictionary = new Dictionary();
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private static ContentModelEntity contentModel;
public static explicit operator hibernateconfiguration(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); }
static hibernateconfiguration() {
BuildElementDictionary();
contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(XName.Get("bytecode-provider", "urn:nhibernate-configuration-2.2")), new NamedContentModelEntity(XName.Get("reflection-optimizer", "urn:nhibernate-configuration-2.2")), new NamedContentModelEntity(XName.Get("session-factory", "urn:nhibernate-configuration-2.2")));
}
///
///
/// Regular expression: (bytecodeprovider?, reflectionoptimizer?, sessionfactory?)
///
///
public hibernateconfiguration() {
}
///
///
/// Occurrence: optional
///
///
/// Regular expression: (bytecodeprovider?, reflectionoptimizer?, sessionfactory?)
///
///
public bytecodeprovider bytecodeprovider {
get {
XElement x = this.GetElement(XName.Get("bytecode-provider", "urn:nhibernate-configuration-2.2"));
return ((bytecodeprovider)(x));
}
set {
this.SetElement(XName.Get("bytecode-provider", "urn:nhibernate-configuration-2.2"), value);
}
}
///
///
/// Occurrence: optional
///
///
/// Regular expression: (bytecodeprovider?, reflectionoptimizer?, sessionfactory?)
///
///
public reflectionoptimizer reflectionoptimizer {
get {
XElement x = this.GetElement(XName.Get("reflection-optimizer", "urn:nhibernate-configuration-2.2"));
return ((reflectionoptimizer)(x));
}
set {
this.SetElement(XName.Get("reflection-optimizer", "urn:nhibernate-configuration-2.2"), value);
}
}
///
///
/// Occurrence: optional
///
///
/// Regular expression: (bytecodeprovider?, reflectionoptimizer?, sessionfactory?)
///
///
public sessionfactory sessionfactory {
get {
XElement x = this.GetElement(XName.Get("session-factory", "urn:nhibernate-configuration-2.2"));
return ((sessionfactory)(x));
}
set {
this.SetElement(XName.Get("session-factory", "urn:nhibernate-configuration-2.2"), value);
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
Dictionary IXMetaData.LocalElementsDictionary {
get {
return localElementDictionary;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
XName IXMetaData.SchemaName {
get {
return XName.Get("hibernate-configuration", "urn:nhibernate-configuration-2.2");
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
SchemaOrigin IXMetaData.TypeOrigin {
get {
return SchemaOrigin.Element;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
ILinqToXsdTypeManager IXMetaData.TypeManager {
get {
return LinqToXsdTypeManager.Instance;
}
}
public void Save(string xmlFile) {
XTypedServices.Save(xmlFile, Untyped);
}
public void Save(System.IO.TextWriter tw) {
XTypedServices.Save(tw, Untyped);
}
public void Save(System.Xml.XmlWriter xmlWriter) {
XTypedServices.Save(xmlWriter, Untyped);
}
public static hibernateconfiguration Load(string xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static hibernateconfiguration Load(System.IO.TextReader xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static hibernateconfiguration Parse(string xml) {
return XTypedServices.Parse(xml);
}
public override XTypedElement Clone() {
return XTypedServices.CloneXTypedElement(this);
}
private static void BuildElementDictionary() {
localElementDictionary.Add(XName.Get("bytecode-provider", "urn:nhibernate-configuration-2.2"), typeof(bytecodeprovider));
localElementDictionary.Add(XName.Get("reflection-optimizer", "urn:nhibernate-configuration-2.2"), typeof(reflectionoptimizer));
localElementDictionary.Add(XName.Get("session-factory", "urn:nhibernate-configuration-2.2"), typeof(sessionfactory));
}
ContentModelEntity IXMetaData.GetContentModel() {
return contentModel;
}
}
public partial class classcache : XTypedElement, IXMetaData {
public static explicit operator classcache(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); }
public classcache() {
}
///
///
/// Occurrence: required
///
///
public string @class {
get {
XAttribute x = this.Attribute(XName.Get("class", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
set {
this.SetAttribute(XName.Get("class", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
///
///
/// Occurrence: optional
///
///
public string region {
get {
XAttribute x = this.Attribute(XName.Get("region", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
set {
this.SetAttribute(XName.Get("region", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
///
///
/// Occurrence: required
///
///
public string usage {
get {
XAttribute x = this.Attribute(XName.Get("usage", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
set {
this.SetAttribute(XName.Get("usage", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
///
///
/// Occurrence: optional
///
///
public string include {
get {
XAttribute x = this.Attribute(XName.Get("include", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
set {
this.SetAttribute(XName.Get("include", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
XName IXMetaData.SchemaName {
get {
return XName.Get("class-cache", "urn:nhibernate-configuration-2.2");
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
SchemaOrigin IXMetaData.TypeOrigin {
get {
return SchemaOrigin.Element;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
ILinqToXsdTypeManager IXMetaData.TypeManager {
get {
return LinqToXsdTypeManager.Instance;
}
}
public void Save(string xmlFile) {
XTypedServices.Save(xmlFile, Untyped);
}
public void Save(System.IO.TextWriter tw) {
XTypedServices.Save(tw, Untyped);
}
public void Save(System.Xml.XmlWriter xmlWriter) {
XTypedServices.Save(xmlWriter, Untyped);
}
public static classcache Load(string xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static classcache Load(System.IO.TextReader xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static classcache Parse(string xml) {
return XTypedServices.Parse(xml);
}
public override XTypedElement Clone() {
return XTypedServices.CloneXTypedElement(this);
}
ContentModelEntity IXMetaData.GetContentModel() {
return ContentModelEntity.Default;
}
}
public partial class collectioncache : XTypedElement, IXMetaData {
public static explicit operator collectioncache(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); }
public collectioncache() {
}
///
///
/// Occurrence: required
///
///
public string collection {
get {
XAttribute x = this.Attribute(XName.Get("collection", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
set {
this.SetAttribute(XName.Get("collection", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
///
///
/// Occurrence: optional
///
///
public string region {
get {
XAttribute x = this.Attribute(XName.Get("region", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
set {
this.SetAttribute(XName.Get("region", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
///
///
/// Occurrence: required
///
///
public string usage {
get {
XAttribute x = this.Attribute(XName.Get("usage", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
set {
this.SetAttribute(XName.Get("usage", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
XName IXMetaData.SchemaName {
get {
return XName.Get("collection-cache", "urn:nhibernate-configuration-2.2");
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
SchemaOrigin IXMetaData.TypeOrigin {
get {
return SchemaOrigin.Element;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
ILinqToXsdTypeManager IXMetaData.TypeManager {
get {
return LinqToXsdTypeManager.Instance;
}
}
public void Save(string xmlFile) {
XTypedServices.Save(xmlFile, Untyped);
}
public void Save(System.IO.TextWriter tw) {
XTypedServices.Save(tw, Untyped);
}
public void Save(System.Xml.XmlWriter xmlWriter) {
XTypedServices.Save(xmlWriter, Untyped);
}
public static collectioncache Load(string xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static collectioncache Load(System.IO.TextReader xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static collectioncache Parse(string xml) {
return XTypedServices.Parse(xml);
}
public override XTypedElement Clone() {
return XTypedServices.CloneXTypedElement(this);
}
ContentModelEntity IXMetaData.GetContentModel() {
return ContentModelEntity.Default;
}
}
public partial class mapping : XTypedElement, IXMetaData {
public static explicit operator mapping(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); }
public mapping() {
}
///
///
/// Occurrence: optional
///
///
public string resource {
get {
XAttribute x = this.Attribute(XName.Get("resource", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype);
}
set {
this.SetAttribute(XName.Get("resource", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype);
}
}
///
///
/// Occurrence: optional
///
///
public string file {
get {
XAttribute x = this.Attribute(XName.Get("file", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype);
}
set {
this.SetAttribute(XName.Get("file", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype);
}
}
///
///
/// Occurrence: optional
///
///
public string assembly {
get {
XAttribute x = this.Attribute(XName.Get("assembly", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype);
}
set {
this.SetAttribute(XName.Get("assembly", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype);
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
XName IXMetaData.SchemaName {
get {
return XName.Get("mapping", "urn:nhibernate-configuration-2.2");
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
SchemaOrigin IXMetaData.TypeOrigin {
get {
return SchemaOrigin.Element;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
ILinqToXsdTypeManager IXMetaData.TypeManager {
get {
return LinqToXsdTypeManager.Instance;
}
}
public void Save(string xmlFile) {
XTypedServices.Save(xmlFile, Untyped);
}
public void Save(System.IO.TextWriter tw) {
XTypedServices.Save(tw, Untyped);
}
public void Save(System.Xml.XmlWriter xmlWriter) {
XTypedServices.Save(xmlWriter, Untyped);
}
public static mapping Load(string xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static mapping Load(System.IO.TextReader xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static mapping Parse(string xml) {
return XTypedServices.Parse(xml);
}
public override XTypedElement Clone() {
return XTypedServices.CloneXTypedElement(this);
}
ContentModelEntity IXMetaData.GetContentModel() {
return ContentModelEntity.Default;
}
}
public partial class property : XTypedElement, IXMetaData {
public static explicit operator property(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); }
public property() {
}
public string TypedValue {
get {
XElement x = this.Untyped;
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
set {
this.SetValue(value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
///
///
/// Occurrence: required
///
///
public string name {
get {
XAttribute x = this.Attribute(XName.Get("name", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
set {
this.SetAttribute(XName.Get("name", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
XName IXMetaData.SchemaName {
get {
return XName.Get("property", "urn:nhibernate-configuration-2.2");
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
SchemaOrigin IXMetaData.TypeOrigin {
get {
return SchemaOrigin.Element;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
ILinqToXsdTypeManager IXMetaData.TypeManager {
get {
return LinqToXsdTypeManager.Instance;
}
}
public void Save(string xmlFile) {
XTypedServices.Save(xmlFile, Untyped);
}
public void Save(System.IO.TextWriter tw) {
XTypedServices.Save(tw, Untyped);
}
public void Save(System.Xml.XmlWriter xmlWriter) {
XTypedServices.Save(xmlWriter, Untyped);
}
public static property Load(string xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static property Load(System.IO.TextReader xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static property Parse(string xml) {
return XTypedServices.Parse(xml);
}
public override XTypedElement Clone() {
return XTypedServices.CloneXTypedElement(this);
}
ContentModelEntity IXMetaData.GetContentModel() {
return ContentModelEntity.Default;
}
}
///
///
/// Regular expression: (property*, mapping*, (classcache | collectioncache)*, @event*, listener*)
///
///
public partial class sessionfactory : XTypedElement, IXMetaData {
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private XTypedList propertyField;
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private XTypedList mappingField;
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private XTypedList classcacheField;
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private XTypedList collectioncacheField;
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private XTypedList<@event> @eventField;
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private XTypedList listenerField;
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
static Dictionary localElementDictionary = new Dictionary();
public static explicit operator sessionfactory(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); }
static sessionfactory() {
BuildElementDictionary();
}
///
///
/// Regular expression: (property*, mapping*, (classcache | collectioncache)*, @event*, listener*)
///
///
public sessionfactory() {
}
///
///
/// Occurrence: optional, repeating
///
///
/// Regular expression: (property*, mapping*, (classcache | collectioncache)*, @event*, listener*)
///
///
public IList property {
get {
if ((this.propertyField == null)) {
this.propertyField = new XTypedList(this, LinqToXsdTypeManager.Instance, XName.Get("property", "urn:nhibernate-configuration-2.2"));
}
return this.propertyField;
}
set {
if ((value == null)) {
this.propertyField = null;
}
else {
if ((this.propertyField == null)) {
this.propertyField = XTypedList.Initialize(this, LinqToXsdTypeManager.Instance, value, XName.Get("property", "urn:nhibernate-configuration-2.2"));
}
else {
XTypedServices.SetList(this.propertyField, value);
}
}
}
}
///
///
/// Occurrence: optional, repeating
///
///
/// Regular expression: (property*, mapping*, (classcache | collectioncache)*, @event*, listener*)
///
///
public IList mapping {
get {
if ((this.mappingField == null)) {
this.mappingField = new XTypedList(this, LinqToXsdTypeManager.Instance, XName.Get("mapping", "urn:nhibernate-configuration-2.2"));
}
return this.mappingField;
}
set {
if ((value == null)) {
this.mappingField = null;
}
else {
if ((this.mappingField == null)) {
this.mappingField = XTypedList.Initialize(this, LinqToXsdTypeManager.Instance, value, XName.Get("mapping", "urn:nhibernate-configuration-2.2"));
}
else {
XTypedServices.SetList(this.mappingField, value);
}
}
}
}
///
///
/// Occurrence: required, choice
///
///
/// Setter: Appends
///
///
/// Regular expression: (property*, mapping*, (classcache | collectioncache)*, @event*, listener*)
///
///
public IList classcache {
get {
if ((this.classcacheField == null)) {
this.classcacheField = new XTypedList(this, LinqToXsdTypeManager.Instance, XName.Get("class-cache", "urn:nhibernate-configuration-2.2"));
}
return this.classcacheField;
}
set {
if ((value == null)) {
this.classcacheField = null;
}
else {
if ((this.classcacheField == null)) {
this.classcacheField = XTypedList.Initialize(this, LinqToXsdTypeManager.Instance, value, XName.Get("class-cache", "urn:nhibernate-configuration-2.2"));
}
else {
XTypedServices.SetList(this.classcacheField, value);
}
}
}
}
///
///
/// Occurrence: required, choice
///
///
/// Setter: Appends
///
///
/// Regular expression: (property*, mapping*, (classcache | collectioncache)*, @event*, listener*)
///
///
public IList collectioncache {
get {
if ((this.collectioncacheField == null)) {
this.collectioncacheField = new XTypedList(this, LinqToXsdTypeManager.Instance, XName.Get("collection-cache", "urn:nhibernate-configuration-2.2"));
}
return this.collectioncacheField;
}
set {
if ((value == null)) {
this.collectioncacheField = null;
}
else {
if ((this.collectioncacheField == null)) {
this.collectioncacheField = XTypedList.Initialize(this, LinqToXsdTypeManager.Instance, value, XName.Get("collection-cache", "urn:nhibernate-configuration-2.2"));
}
else {
XTypedServices.SetList(this.collectioncacheField, value);
}
}
}
}
///
///
/// Occurrence: optional, repeating
///
///
/// Regular expression: (property*, mapping*, (classcache | collectioncache)*, @event*, listener*)
///
///
public IList<@event> @event {
get {
if ((this.@eventField == null)) {
this.@eventField = new XTypedList<@event>(this, LinqToXsdTypeManager.Instance, XName.Get("event", "urn:nhibernate-configuration-2.2"));
}
return this.@eventField;
}
set {
if ((value == null)) {
this.@eventField = null;
}
else {
if ((this.@eventField == null)) {
this.@eventField = XTypedList<@event>.Initialize(this, LinqToXsdTypeManager.Instance, value, XName.Get("event", "urn:nhibernate-configuration-2.2"));
}
else {
XTypedServices.SetList<@event>(this.@eventField, value);
}
}
}
}
///
///
/// Occurrence: optional, repeating
///
///
/// Regular expression: (property*, mapping*, (classcache | collectioncache)*, @event*, listener*)
///
///
public IList listener {
get {
if ((this.listenerField == null)) {
this.listenerField = new XTypedList(this, LinqToXsdTypeManager.Instance, XName.Get("listener", "urn:nhibernate-configuration-2.2"));
}
return this.listenerField;
}
set {
if ((value == null)) {
this.listenerField = null;
}
else {
if ((this.listenerField == null)) {
this.listenerField = XTypedList.Initialize(this, LinqToXsdTypeManager.Instance, value, XName.Get("listener", "urn:nhibernate-configuration-2.2"));
}
else {
XTypedServices.SetList(this.listenerField, value);
}
}
}
}
///
///
/// Occurrence: optional
///
///
public string name {
get {
XAttribute x = this.Attribute(XName.Get("name", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype);
}
set {
this.SetAttribute(XName.Get("name", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype);
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
Dictionary IXMetaData.LocalElementsDictionary {
get {
return localElementDictionary;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
XName IXMetaData.SchemaName {
get {
return XName.Get("session-factory", "urn:nhibernate-configuration-2.2");
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
SchemaOrigin IXMetaData.TypeOrigin {
get {
return SchemaOrigin.Element;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
ILinqToXsdTypeManager IXMetaData.TypeManager {
get {
return LinqToXsdTypeManager.Instance;
}
}
public void Save(string xmlFile) {
XTypedServices.Save(xmlFile, Untyped);
}
public void Save(System.IO.TextWriter tw) {
XTypedServices.Save(tw, Untyped);
}
public void Save(System.Xml.XmlWriter xmlWriter) {
XTypedServices.Save(xmlWriter, Untyped);
}
public static sessionfactory Load(string xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static sessionfactory Load(System.IO.TextReader xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static sessionfactory Parse(string xml) {
return XTypedServices.Parse(xml);
}
public override XTypedElement Clone() {
return XTypedServices.CloneXTypedElement(this);
}
private static void BuildElementDictionary() {
localElementDictionary.Add(XName.Get("property", "urn:nhibernate-configuration-2.2"), typeof(property));
localElementDictionary.Add(XName.Get("mapping", "urn:nhibernate-configuration-2.2"), typeof(mapping));
localElementDictionary.Add(XName.Get("class-cache", "urn:nhibernate-configuration-2.2"), typeof(classcache));
localElementDictionary.Add(XName.Get("collection-cache", "urn:nhibernate-configuration-2.2"), typeof(collectioncache));
localElementDictionary.Add(XName.Get("event", "urn:nhibernate-configuration-2.2"), typeof(@event));
localElementDictionary.Add(XName.Get("listener", "urn:nhibernate-configuration-2.2"), typeof(listener));
}
ContentModelEntity IXMetaData.GetContentModel() {
return ContentModelEntity.Default;
}
}
///
///
/// Regular expression: (listener+)
///
///
public partial class @event : XTypedElement, IXMetaData {
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private XTypedList listenerField;
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
static Dictionary localElementDictionary = new Dictionary();
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private static ContentModelEntity contentModel;
public static explicit operator @event(XElement xe) { return XTypedServices.ToXTypedElement<@event>(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); }
static @event() {
BuildElementDictionary();
contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(XName.Get("listener", "urn:nhibernate-configuration-2.2")));
}
///
///
/// Regular expression: (listener+)
///
///
public @event() {
}
///
///
/// Occurrence: required, repeating
///
///
/// Regular expression: (listener+)
///
///
public IList listener {
get {
if ((this.listenerField == null)) {
this.listenerField = new XTypedList(this, LinqToXsdTypeManager.Instance, XName.Get("listener", "urn:nhibernate-configuration-2.2"));
}
return this.listenerField;
}
set {
if ((value == null)) {
this.listenerField = null;
}
else {
if ((this.listenerField == null)) {
this.listenerField = XTypedList.Initialize(this, LinqToXsdTypeManager.Instance, value, XName.Get("listener", "urn:nhibernate-configuration-2.2"));
}
else {
XTypedServices.SetList(this.listenerField, value);
}
}
}
}
///
///
/// Occurrence: required
///
///
public string type {
get {
XAttribute x = this.Attribute(XName.Get("type", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
set {
this.SetAttribute(XName.Get("type", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
Dictionary IXMetaData.LocalElementsDictionary {
get {
return localElementDictionary;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
XName IXMetaData.SchemaName {
get {
return XName.Get("event", "urn:nhibernate-configuration-2.2");
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
SchemaOrigin IXMetaData.TypeOrigin {
get {
return SchemaOrigin.Element;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
ILinqToXsdTypeManager IXMetaData.TypeManager {
get {
return LinqToXsdTypeManager.Instance;
}
}
public void Save(string xmlFile) {
XTypedServices.Save(xmlFile, Untyped);
}
public void Save(System.IO.TextWriter tw) {
XTypedServices.Save(tw, Untyped);
}
public void Save(System.Xml.XmlWriter xmlWriter) {
XTypedServices.Save(xmlWriter, Untyped);
}
public static @event Load(string xmlFile) {
return XTypedServices.Load<@event>(xmlFile);
}
public static @event Load(System.IO.TextReader xmlFile) {
return XTypedServices.Load<@event>(xmlFile);
}
public static @event Parse(string xml) {
return XTypedServices.Parse<@event>(xml);
}
public override XTypedElement Clone() {
return XTypedServices.CloneXTypedElement<@event>(this);
}
private static void BuildElementDictionary() {
localElementDictionary.Add(XName.Get("listener", "urn:nhibernate-configuration-2.2"), typeof(listener));
}
ContentModelEntity IXMetaData.GetContentModel() {
return contentModel;
}
}
public partial class listener : XTypedElement, IXMetaData {
public static explicit operator listener(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); }
public listener() {
}
///
///
/// Occurrence: required
///
///
public string @class {
get {
XAttribute x = this.Attribute(XName.Get("class", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
set {
this.SetAttribute(XName.Get("class", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
///
///
/// Occurrence: optional
///
///
public string type {
get {
XAttribute x = this.Attribute(XName.Get("type", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
set {
this.SetAttribute(XName.Get("type", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
XName IXMetaData.SchemaName {
get {
return XName.Get("listener", "urn:nhibernate-configuration-2.2");
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
SchemaOrigin IXMetaData.TypeOrigin {
get {
return SchemaOrigin.Element;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
ILinqToXsdTypeManager IXMetaData.TypeManager {
get {
return LinqToXsdTypeManager.Instance;
}
}
public void Save(string xmlFile) {
XTypedServices.Save(xmlFile, Untyped);
}
public void Save(System.IO.TextWriter tw) {
XTypedServices.Save(tw, Untyped);
}
public void Save(System.Xml.XmlWriter xmlWriter) {
XTypedServices.Save(xmlWriter, Untyped);
}
public static listener Load(string xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static listener Load(System.IO.TextReader xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static listener Parse(string xml) {
return XTypedServices.Parse(xml);
}
public override XTypedElement Clone() {
return XTypedServices.CloneXTypedElement(this);
}
ContentModelEntity IXMetaData.GetContentModel() {
return ContentModelEntity.Default;
}
}
public partial class bytecodeprovider : XTypedElement, IXMetaData {
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private static string typeDefaultValue = "lcg";
public static explicit operator bytecodeprovider(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); }
public bytecodeprovider() {
}
///
///
/// Occurrence: optional
///
///
public string type {
get {
XAttribute x = this.Attribute(XName.Get("type", ""));
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, typeDefaultValue);
}
set {
this.SetAttribute(XName.Get("type", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype);
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
XName IXMetaData.SchemaName {
get {
return XName.Get("bytecode-provider", "urn:nhibernate-configuration-2.2");
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
SchemaOrigin IXMetaData.TypeOrigin {
get {
return SchemaOrigin.Element;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
ILinqToXsdTypeManager IXMetaData.TypeManager {
get {
return LinqToXsdTypeManager.Instance;
}
}
public void Save(string xmlFile) {
XTypedServices.Save(xmlFile, Untyped);
}
public void Save(System.IO.TextWriter tw) {
XTypedServices.Save(tw, Untyped);
}
public void Save(System.Xml.XmlWriter xmlWriter) {
XTypedServices.Save(xmlWriter, Untyped);
}
public static bytecodeprovider Load(string xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static bytecodeprovider Load(System.IO.TextReader xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static bytecodeprovider Parse(string xml) {
return XTypedServices.Parse(xml);
}
public override XTypedElement Clone() {
return XTypedServices.CloneXTypedElement(this);
}
ContentModelEntity IXMetaData.GetContentModel() {
return ContentModelEntity.Default;
}
}
public partial class reflectionoptimizer : XTypedElement, IXMetaData {
public static explicit operator reflectionoptimizer(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); }
public reflectionoptimizer() {
}
///
///
/// Occurrence: optional
///
///
public System.Nullable use {
get {
XAttribute x = this.Attribute(XName.Get("use", ""));
if ((x == null)) {
return null;
}
return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Boolean).Datatype);
}
set {
this.SetAttribute(XName.Get("use", ""), value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Boolean).Datatype);
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
XName IXMetaData.SchemaName {
get {
return XName.Get("reflection-optimizer", "urn:nhibernate-configuration-2.2");
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
SchemaOrigin IXMetaData.TypeOrigin {
get {
return SchemaOrigin.Element;
}
}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
ILinqToXsdTypeManager IXMetaData.TypeManager {
get {
return LinqToXsdTypeManager.Instance;
}
}
public void Save(string xmlFile) {
XTypedServices.Save(xmlFile, Untyped);
}
public void Save(System.IO.TextWriter tw) {
XTypedServices.Save(tw, Untyped);
}
public void Save(System.Xml.XmlWriter xmlWriter) {
XTypedServices.Save(xmlWriter, Untyped);
}
public static reflectionoptimizer Load(string xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static reflectionoptimizer Load(System.IO.TextReader xmlFile) {
return XTypedServices.Load(xmlFile);
}
public static reflectionoptimizer Parse(string xml) {
return XTypedServices.Parse(xml);
}
public override XTypedElement Clone() {
return XTypedServices.CloneXTypedElement(this);
}
ContentModelEntity IXMetaData.GetContentModel() {
return ContentModelEntity.Default;
}
}
public sealed class listenerType {
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
public static Xml.Schema.Linq.SimpleTypeValidator TypeDefinition = new Xml.Schema.Linq.AtomicSimpleTypeValidator(XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String), new Xml.Schema.Linq.RestrictionFacets(((Xml.Schema.Linq.RestrictionFlags)(16)), new object[] {
"auto-flush",
"merge",
"create",
"create-onflush",
"delete",
"dirty-check",
"evict",
"flush",
"flush-entity",
"load",
"load-collection",
"lock",
"refresh",
"replicate",
"save-update",
"save",
"pre-update",
"update",
"pre-load",
"pre-delete",
"pre-insert",
"post-load",
"post-insert",
"post-update",
"post-delete",
"post-commit-update",
"post-commit-insert",
"post-commit-delete",
"pre-collection-recreate",
"pre-collection-remove",
"pre-collection-update",
"post-collection-recreate",
"post-collection-remove",
"post-collection-update"}, 0, 0, null, null, 0, null, null, 0, null, 0, XmlSchemaWhiteSpace.Preserve));
private listenerType() {
}
}
public class LinqToXsdTypeManager : ILinqToXsdTypeManager {
static Dictionary elementDictionary = new Dictionary();
private static XmlSchemaSet schemaSet;
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
static LinqToXsdTypeManager typeManagerSingleton = new LinqToXsdTypeManager();
static LinqToXsdTypeManager() {
BuildElementDictionary();
}
XmlSchemaSet ILinqToXsdTypeManager.Schemas {
get {
if ((schemaSet == null)) {
XmlSchemaSet tempSet = new XmlSchemaSet();
System.Threading.Interlocked.CompareExchange(ref schemaSet, tempSet, null);
}
return schemaSet;
}
set {
schemaSet = value;
}
}
Dictionary ILinqToXsdTypeManager.GlobalTypeDictionary {
get {
return XTypedServices.EmptyDictionary;
}
}
Dictionary ILinqToXsdTypeManager.GlobalElementDictionary {
get {
return elementDictionary;
}
}
Dictionary ILinqToXsdTypeManager.RootContentTypeMapping {
get {
return XTypedServices.EmptyTypeMappingDictionary;
}
}
public static LinqToXsdTypeManager Instance {
get {
return typeManagerSingleton;
}
}
private static void BuildElementDictionary() {
elementDictionary.Add(XName.Get("hibernate-configuration", "urn:nhibernate-configuration-2.2"), typeof(global::urn.nhibernate.configuration.Item2.Item2.hibernateconfiguration));
elementDictionary.Add(XName.Get("class-cache", "urn:nhibernate-configuration-2.2"), typeof(global::urn.nhibernate.configuration.Item2.Item2.classcache));
elementDictionary.Add(XName.Get("collection-cache", "urn:nhibernate-configuration-2.2"), typeof(global::urn.nhibernate.configuration.Item2.Item2.collectioncache));
elementDictionary.Add(XName.Get("mapping", "urn:nhibernate-configuration-2.2"), typeof(global::urn.nhibernate.configuration.Item2.Item2.mapping));
elementDictionary.Add(XName.Get("property", "urn:nhibernate-configuration-2.2"), typeof(global::urn.nhibernate.configuration.Item2.Item2.property));
elementDictionary.Add(XName.Get("session-factory", "urn:nhibernate-configuration-2.2"), typeof(global::urn.nhibernate.configuration.Item2.Item2.sessionfactory));
elementDictionary.Add(XName.Get("event", "urn:nhibernate-configuration-2.2"), typeof(global::urn.nhibernate.configuration.Item2.Item2.@event));
elementDictionary.Add(XName.Get("listener", "urn:nhibernate-configuration-2.2"), typeof(global::urn.nhibernate.configuration.Item2.Item2.listener));
elementDictionary.Add(XName.Get("bytecode-provider", "urn:nhibernate-configuration-2.2"), typeof(global::urn.nhibernate.configuration.Item2.Item2.bytecodeprovider));
elementDictionary.Add(XName.Get("reflection-optimizer", "urn:nhibernate-configuration-2.2"), typeof(global::urn.nhibernate.configuration.Item2.Item2.reflectionoptimizer));
}
protected internal static void AddSchemas(XmlSchemaSet schemas) {
schemas.Add(schemaSet);
}
public static System.Type GetRootType() {
return elementDictionary[XName.Get("hibernate-configuration", "urn:nhibernate-configuration-2.2")];
}
}
public partial class XRootNamespace {
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private XDocument doc;
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private XTypedElement rootObject;
public hibernateconfiguration hibernateconfiguration { get {return rootObject as hibernateconfiguration; } }
public classcache classcache { get {return rootObject as classcache; } }
public collectioncache collectioncache { get {return rootObject as collectioncache; } }
public mapping mapping { get {return rootObject as mapping; } }
public property property { get {return rootObject as property; } }
public sessionfactory sessionfactory { get {return rootObject as sessionfactory; } }
public @event @event { get {return rootObject as @event; } }
public listener listener { get {return rootObject as listener; } }
public bytecodeprovider bytecodeprovider { get {return rootObject as bytecodeprovider; } }
public reflectionoptimizer reflectionoptimizer { get {return rootObject as reflectionoptimizer; } }
private XRootNamespace() {
}
public XRootNamespace(hibernateconfiguration root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRootNamespace(classcache root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRootNamespace(collectioncache root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRootNamespace(mapping root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRootNamespace(property root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRootNamespace(sessionfactory root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRootNamespace(@event root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRootNamespace(listener root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRootNamespace(bytecodeprovider root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRootNamespace(reflectionoptimizer root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XDocument XDocument {
get {
return doc;
}
}
public static XRootNamespace Load(string xmlFile) {
XRootNamespace root = new XRootNamespace();
root.doc = XDocument.Load(xmlFile);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public static XRootNamespace Load(string xmlFile, LoadOptions options) {
XRootNamespace root = new XRootNamespace();
root.doc = XDocument.Load(xmlFile, options);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public static XRootNamespace Load(TextReader textReader) {
XRootNamespace root = new XRootNamespace();
root.doc = XDocument.Load(textReader);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public static XRootNamespace Load(TextReader textReader, LoadOptions options) {
XRootNamespace root = new XRootNamespace();
root.doc = XDocument.Load(textReader, options);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public static XRootNamespace Load(XmlReader xmlReader) {
XRootNamespace root = new XRootNamespace();
root.doc = XDocument.Load(xmlReader);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public static XRootNamespace Parse(string text) {
XRootNamespace root = new XRootNamespace();
root.doc = XDocument.Parse(text);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public static XRootNamespace Parse(string text, LoadOptions options) {
XRootNamespace root = new XRootNamespace();
root.doc = XDocument.Parse(text, options);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public virtual void Save(string fileName) {
doc.Save(fileName);
}
public virtual void Save(TextWriter textWriter) {
doc.Save(textWriter);
}
public virtual void Save(XmlWriter writer) {
doc.Save(writer);
}
public virtual void Save(TextWriter textWriter, SaveOptions options) {
doc.Save(textWriter, options);
}
public virtual void Save(string fileName, SaveOptions options) {
doc.Save(fileName, options);
}
}
public partial class XRoot {
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private XDocument doc;
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private XTypedElement rootObject;
public global::urn.nhibernate.configuration.Item2.Item2.hibernateconfiguration hibernateconfiguration { get {return rootObject as global::urn.nhibernate.configuration.Item2.Item2.hibernateconfiguration; } }
public global::urn.nhibernate.configuration.Item2.Item2.classcache classcache { get {return rootObject as global::urn.nhibernate.configuration.Item2.Item2.classcache; } }
public global::urn.nhibernate.configuration.Item2.Item2.collectioncache collectioncache { get {return rootObject as global::urn.nhibernate.configuration.Item2.Item2.collectioncache; } }
public global::urn.nhibernate.configuration.Item2.Item2.mapping mapping { get {return rootObject as global::urn.nhibernate.configuration.Item2.Item2.mapping; } }
public global::urn.nhibernate.configuration.Item2.Item2.property property { get {return rootObject as global::urn.nhibernate.configuration.Item2.Item2.property; } }
public global::urn.nhibernate.configuration.Item2.Item2.sessionfactory sessionfactory { get {return rootObject as global::urn.nhibernate.configuration.Item2.Item2.sessionfactory; } }
public global::urn.nhibernate.configuration.Item2.Item2.@event @event { get {return rootObject as global::urn.nhibernate.configuration.Item2.Item2.@event; } }
public global::urn.nhibernate.configuration.Item2.Item2.listener listener { get {return rootObject as global::urn.nhibernate.configuration.Item2.Item2.listener; } }
public global::urn.nhibernate.configuration.Item2.Item2.bytecodeprovider bytecodeprovider { get {return rootObject as global::urn.nhibernate.configuration.Item2.Item2.bytecodeprovider; } }
public global::urn.nhibernate.configuration.Item2.Item2.reflectionoptimizer reflectionoptimizer { get {return rootObject as global::urn.nhibernate.configuration.Item2.Item2.reflectionoptimizer; } }
private XRoot() {
}
public XRoot(global::urn.nhibernate.configuration.Item2.Item2.hibernateconfiguration root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRoot(global::urn.nhibernate.configuration.Item2.Item2.classcache root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRoot(global::urn.nhibernate.configuration.Item2.Item2.collectioncache root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRoot(global::urn.nhibernate.configuration.Item2.Item2.mapping root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRoot(global::urn.nhibernate.configuration.Item2.Item2.property root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRoot(global::urn.nhibernate.configuration.Item2.Item2.sessionfactory root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRoot(global::urn.nhibernate.configuration.Item2.Item2.@event root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRoot(global::urn.nhibernate.configuration.Item2.Item2.listener root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRoot(global::urn.nhibernate.configuration.Item2.Item2.bytecodeprovider root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XRoot(global::urn.nhibernate.configuration.Item2.Item2.reflectionoptimizer root) {
this.doc = new XDocument(root.Untyped);
this.rootObject = root;
}
public XDocument XDocument {
get {
return doc;
}
}
public static XRoot Load(string xmlFile) {
XRoot root = new XRoot();
root.doc = XDocument.Load(xmlFile);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public static XRoot Load(string xmlFile, LoadOptions options) {
XRoot root = new XRoot();
root.doc = XDocument.Load(xmlFile, options);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public static XRoot Load(TextReader textReader) {
XRoot root = new XRoot();
root.doc = XDocument.Load(textReader);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public static XRoot Load(TextReader textReader, LoadOptions options) {
XRoot root = new XRoot();
root.doc = XDocument.Load(textReader, options);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public static XRoot Load(XmlReader xmlReader) {
XRoot root = new XRoot();
root.doc = XDocument.Load(xmlReader);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public static XRoot Parse(string text) {
XRoot root = new XRoot();
root.doc = XDocument.Parse(text);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public static XRoot Parse(string text, LoadOptions options) {
XRoot root = new XRoot();
root.doc = XDocument.Parse(text, options);
XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance);
if ((typedRoot == null)) {
throw new LinqToXsdException("Invalid root element in xml document.");
}
root.rootObject = typedRoot;
return root;
}
public virtual void Save(string fileName) {
doc.Save(fileName);
}
public virtual void Save(TextWriter textWriter) {
doc.Save(textWriter);
}
public virtual void Save(XmlWriter writer) {
doc.Save(writer);
}
public virtual void Save(TextWriter textWriter, SaveOptions options) {
doc.Save(textWriter, options);
}
public virtual void Save(string fileName, SaveOptions options) {
doc.Save(fileName, options);
}
}
}