示例#1
0
		void WriteObject_TableFunctionReturn (DbLinq.Schema.Dbml.TableFunctionReturn ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
		{
			if (((object)ob) == null)
			{
				if (isNullable)
					WriteNullTagLiteral(element, namesp);
				return;
			}

			System.Type type = ob.GetType ();
			if (type == typeof(DbLinq.Schema.Dbml.TableFunctionReturn))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

			if (writeWrappingElem) {
				WriteStartElement (element, namesp, ob);
			}

			if (needType) WriteXsiType("TableFunctionReturn", "http://schemas.microsoft.com/linqtosql/dbml/2007");

			WriteAttribute ("Member", "", ob.@Member);

			if (writeWrappingElem) WriteEndElement (ob);
		}
示例#2
0
		void WriteObject_Version (DbLinq.Schema.Dbml.Version ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
		{
			System.Type type = ob.GetType ();
			if (type == typeof(DbLinq.Schema.Dbml.Version))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

			if (writeWrappingElem) {
				WriteStartElement (element, namesp, ob);
			}

			if (needType) WriteXsiType("Version", "http://schemas.microsoft.com/linqtosql/dbml/2007");

			Writer.WriteString (GetEnumValue_Version (ob));
			if (writeWrappingElem) WriteEndElement (ob);
		}
示例#3
0
		void WriteObject_Column (DbLinq.Schema.Dbml.Column ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
		{
			if (((object)ob) == null)
			{
				if (isNullable)
					WriteNullTagLiteral(element, namesp);
				return;
			}

			System.Type type = ob.GetType ();
			if (type == typeof(DbLinq.Schema.Dbml.Column))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

			if (writeWrappingElem) {
				WriteStartElement (element, namesp, ob);
			}

			if (needType) WriteXsiType("Column", "http://schemas.microsoft.com/linqtosql/dbml/2007");

			WriteAttribute ("Name", "", ob.@Name);
			WriteAttribute ("Member", "", ob.@Member);
			WriteAttribute ("Storage", "", ob.@Storage);
			if (ob.@AccessModifierSpecified) {
				WriteAttribute ("AccessModifier", "", GetEnumValue_AccessModifier (ob.@AccessModifier));
			}
			if (ob.@ModifierSpecified) {
				WriteAttribute ("Modifier", "", GetEnumValue_MemberModifier (ob.@Modifier));
			}
			WriteAttribute ("Type", "", ob.@Type);
			WriteAttribute ("DbType", "", ob.@DbType);
			if (ob.@IsReadOnlySpecified) {
				WriteAttribute ("IsReadOnly", "", (ob.@IsReadOnly?"true":"false"));
			}
			if (ob.@IsPrimaryKeySpecified) {
				WriteAttribute ("IsPrimaryKey", "", (ob.@IsPrimaryKey?"true":"false"));
			}
			if (ob.@IsDbGeneratedSpecified) {
				WriteAttribute ("IsDbGenerated", "", (ob.@IsDbGenerated?"true":"false"));
			}
			if (ob.@CanBeNullSpecified) {
				WriteAttribute ("CanBeNull", "", (ob.@CanBeNull?"true":"false"));
			}
			if (ob.@UpdateCheckSpecified) {
				WriteAttribute ("UpdateCheck", "", GetEnumValue_UpdateCheck (ob.@UpdateCheck));
			}
			if (ob.@IsDiscriminatorSpecified) {
				WriteAttribute ("IsDiscriminator", "", (ob.@IsDiscriminator?"true":"false"));
			}
			WriteAttribute ("Expression", "", ob.@Expression);
			if (ob.@IsVersionSpecified) {
				WriteAttribute ("IsVersion", "", (ob.@IsVersion?"true":"false"));
			}
			if (ob.@IsDelayLoadedSpecified) {
				WriteAttribute ("IsDelayLoaded", "", (ob.@IsDelayLoaded?"true":"false"));
			}
			if (ob.@AutoSyncSpecified) {
				WriteAttribute ("AutoSync", "", GetEnumValue_AutoSync (ob.@AutoSync));
			}

			if (writeWrappingElem) WriteEndElement (ob);
		}
示例#4
0
		void WriteObject_Association (DbLinq.Schema.Dbml.Association ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
		{
			if (((object)ob) == null)
			{
				if (isNullable)
					WriteNullTagLiteral(element, namesp);
				return;
			}

			System.Type type = ob.GetType ();
			if (type == typeof(DbLinq.Schema.Dbml.Association))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

			if (writeWrappingElem) {
				WriteStartElement (element, namesp, ob);
			}

			if (needType) WriteXsiType("Association", "http://schemas.microsoft.com/linqtosql/dbml/2007");

			WriteAttribute ("Name", "", ob.@Name);
			WriteAttribute ("Member", "", ob.@Member);
			WriteAttribute ("Storage", "", ob.@Storage);
			if (ob.@AccessModifierSpecified) {
				WriteAttribute ("AccessModifier", "", GetEnumValue_AccessModifier (ob.@AccessModifier));
			}
			if (ob.@ModifierSpecified) {
				WriteAttribute ("Modifier", "", GetEnumValue_MemberModifier (ob.@Modifier));
			}
			WriteAttribute ("Type", "", ob.@Type);
			WriteAttribute ("ThisKey", "", ob.@ThisKey);
			WriteAttribute ("OtherKey", "", ob.@OtherKey);
			if (ob.@IsForeignKeySpecified) {
				WriteAttribute ("IsForeignKey", "", (ob.@IsForeignKey?"true":"false"));
			}
			if (ob.@CardinalitySpecified) {
				WriteAttribute ("Cardinality", "", GetEnumValue_Cardinality (ob.@Cardinality));
			}
			WriteAttribute ("DeleteRule", "", ob.@DeleteRule);
			if (ob.@DeleteOnNullSpecified) {
				WriteAttribute ("DeleteOnNull", "", (ob.@DeleteOnNull?"true":"false"));
			}

			if (writeWrappingElem) WriteEndElement (ob);
		}
示例#5
0
		void WriteObject_TableFunction (DbLinq.Schema.Dbml.TableFunction ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
		{
			if (((object)ob) == null)
			{
				if (isNullable)
					WriteNullTagLiteral(element, namesp);
				return;
			}

			System.Type type = ob.GetType ();
			if (type == typeof(DbLinq.Schema.Dbml.TableFunction))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

			if (writeWrappingElem) {
				WriteStartElement (element, namesp, ob);
			}

			if (needType) WriteXsiType("TableFunction", "http://schemas.microsoft.com/linqtosql/dbml/2007");

			WriteAttribute ("FunctionId", "", ob.@FunctionId);
			if (ob.@AccessModifierSpecified) {
				WriteAttribute ("AccessModifier", "", GetEnumValue_AccessModifier (ob.@AccessModifier));
			}

			if (ob.@Argument != null) {
				for (int n33 = 0; n33 < [email protected]; n33++) {
					WriteObject_TableFunctionParameter (ob.@Argument[n33], "Argument", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
				}
			}
			WriteObject_TableFunctionReturn (ob.@Return, "Return", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
			if (writeWrappingElem) WriteEndElement (ob);
		}
示例#6
0
		void WriteObject_Parameter (DbLinq.Schema.Dbml.Parameter ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
		{
			if (((object)ob) == null)
			{
				if (isNullable)
					WriteNullTagLiteral(element, namesp);
				return;
			}

			System.Type type = ob.GetType ();
			if (type == typeof(DbLinq.Schema.Dbml.Parameter))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

			if (writeWrappingElem) {
				WriteStartElement (element, namesp, ob);
			}

			if (needType) WriteXsiType("Parameter", "http://schemas.microsoft.com/linqtosql/dbml/2007");

			WriteAttribute ("Name", "", ob.@Name);
			WriteAttribute ("Parameter", "", ob.@Parameter1);
			WriteAttribute ("Type", "", ob.@Type);
			WriteAttribute ("DbType", "", ob.@DbType);
			if (ob.@DirectionSpecified) {
				WriteAttribute ("Direction", "", GetEnumValue_ParameterDirection (ob.@Direction));
			}

			if (writeWrappingElem) WriteEndElement (ob);
		}
示例#7
0
		void WriteObject_Type (DbLinq.Schema.Dbml.Type ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
		{
			if (((object)ob) == null)
			{
				if (isNullable)
					WriteNullTagLiteral(element, namesp);
				return;
			}

			System.Type type = ob.GetType ();
			if (type == typeof(DbLinq.Schema.Dbml.Type))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

			if (writeWrappingElem) {
				WriteStartElement (element, namesp, ob);
			}

			if (needType) WriteXsiType("Type", "http://schemas.microsoft.com/linqtosql/dbml/2007");

			WriteAttribute ("IdRef", "", ob.@IdRef);
			WriteAttribute ("Id", "", ob.@Id);
			WriteAttribute ("Name", "", ob.@Name);
			WriteAttribute ("InheritanceCode", "", ob.@InheritanceCode);
			if (ob.@IsInheritanceDefaultSpecified) {
				WriteAttribute ("IsInheritanceDefault", "", (ob.@IsInheritanceDefault?"true":"false"));
			}
			if (ob.@AccessModifierSpecified) {
				WriteAttribute ("AccessModifier", "", GetEnumValue_AccessModifier (ob.@AccessModifier));
			}
			if (ob.@ModifierSpecified) {
				WriteAttribute ("Modifier", "", GetEnumValue_ClassModifier (ob.@Modifier));
			}

			if (ob.@Items != null) {
				for (int n31 = 0; n31 < [email protected]; n31++) {
					if (((object)ob.@Items[n31]) == null) { }
					else if (ob.@Items[n31].GetType() == typeof(DbLinq.Schema.Dbml.Column)) {
						WriteObject_Column (((DbLinq.Schema.Dbml.Column) ob.@Items[n31]), "Column", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
					}
					else if (ob.@Items[n31].GetType() == typeof(DbLinq.Schema.Dbml.Association)) {
						WriteObject_Association (((DbLinq.Schema.Dbml.Association) ob.@Items[n31]), "Association", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
					}
					else throw CreateUnknownTypeException (ob.@Items[n31]);
				}
			}
			if (ob.@Type1 != null) {
				for (int n32 = 0; n32 < [email protected]; n32++) {
					WriteObject_Type (ob.@Type1[n32], "Type", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
				}
			}
			if (writeWrappingElem) WriteEndElement (ob);
		}
示例#8
0
		void WriteObject_Function (DbLinq.Schema.Dbml.Function ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
		{
			if (((object)ob) == null)
			{
				if (isNullable)
					WriteNullTagLiteral(element, namesp);
				return;
			}

			System.Type type = ob.GetType ();
			if (type == typeof(DbLinq.Schema.Dbml.Function))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

			if (writeWrappingElem) {
				WriteStartElement (element, namesp, ob);
			}

			if (needType) WriteXsiType("Function", "http://schemas.microsoft.com/linqtosql/dbml/2007");

			WriteAttribute ("Name", "", ob.@Name);
			WriteAttribute ("Id", "", ob.@Id);
			WriteAttribute ("Method", "", ob.@Method);
			if (ob.@AccessModifierSpecified) {
				WriteAttribute ("AccessModifier", "", GetEnumValue_AccessModifier (ob.@AccessModifier));
			}
			if (ob.@ModifierSpecified) {
				WriteAttribute ("Modifier", "", GetEnumValue_MemberModifier (ob.@Modifier));
			}
			if (ob.@HasMultipleResultsSpecified) {
				WriteAttribute ("HasMultipleResults", "", (ob.@HasMultipleResults?"true":"false"));
			}
			if (ob.@IsComposableSpecified) {
				WriteAttribute ("IsComposable", "", (ob.@IsComposable?"true":"false"));
			}

			if (ob.@Parameter != null) {
				for (int n29 = 0; n29 < [email protected]; n29++) {
					WriteObject_Parameter (ob.@Parameter[n29], "Parameter", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
				}
			}
			if (ob.@Items != null) {
				for (int n30 = 0; n30 < [email protected]; n30++) {
					if (((object)ob.@Items[n30]) == null) { }
					else if (ob.@Items[n30].GetType() == typeof(DbLinq.Schema.Dbml.Return)) {
						WriteObject_Return (((DbLinq.Schema.Dbml.Return) ob.@Items[n30]), "Return", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
					}
					else if (ob.@Items[n30].GetType() == typeof(DbLinq.Schema.Dbml.Type)) {
						WriteObject_Type (((DbLinq.Schema.Dbml.Type) ob.@Items[n30]), "ElementType", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
					}
					else throw CreateUnknownTypeException (ob.@Items[n30]);
				}
			}
			if (writeWrappingElem) WriteEndElement (ob);
		}
示例#9
0
		void WriteObject_Table (DbLinq.Schema.Dbml.Table ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
		{
			if (((object)ob) == null)
			{
				if (isNullable)
					WriteNullTagLiteral(element, namesp);
				return;
			}

			System.Type type = ob.GetType ();
			if (type == typeof(DbLinq.Schema.Dbml.Table))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

			if (writeWrappingElem) {
				WriteStartElement (element, namesp, ob);
			}

			if (needType) WriteXsiType("Table", "http://schemas.microsoft.com/linqtosql/dbml/2007");

			WriteAttribute ("Name", "", ob.@Name);
			WriteAttribute ("Member", "", ob.@Member);
			if (ob.@AccessModifierSpecified) {
				WriteAttribute ("AccessModifier", "", GetEnumValue_AccessModifier (ob.@AccessModifier));
			}
			if (ob.@ModifierSpecified) {
				WriteAttribute ("Modifier", "", GetEnumValue_MemberModifier (ob.@Modifier));
			}

			WriteObject_Type (ob.@Type, "Type", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
			WriteObject_TableFunction (ob.@InsertFunction, "InsertFunction", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
			WriteObject_TableFunction (ob.@UpdateFunction, "UpdateFunction", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
			WriteObject_TableFunction (ob.@DeleteFunction, "DeleteFunction", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
			if (writeWrappingElem) WriteEndElement (ob);
		}
示例#10
0
		void WriteObject_Connection (DbLinq.Schema.Dbml.Connection ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
		{
			if (((object)ob) == null)
			{
				if (isNullable)
					WriteNullTagLiteral(element, namesp);
				return;
			}

			System.Type type = ob.GetType ();
			if (type == typeof(DbLinq.Schema.Dbml.Connection))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

			if (writeWrappingElem) {
				WriteStartElement (element, namesp, ob);
			}

			if (needType) WriteXsiType("Connection", "http://schemas.microsoft.com/linqtosql/dbml/2007");

			WriteAttribute ("Provider", "", ob.@Provider);
			if (ob.@ModeSpecified) {
				WriteAttribute ("Mode", "", GetEnumValue_ConnectionMode (ob.@Mode));
			}
			WriteAttribute ("ConnectionString", "", ob.@ConnectionString);
			WriteAttribute ("SettingsObjectName", "", ob.@SettingsObjectName);
			WriteAttribute ("SettingsPropertyName", "", ob.@SettingsPropertyName);

			if (writeWrappingElem) WriteEndElement (ob);
		}
示例#11
0
		void WriteObject_Database (DbLinq.Schema.Dbml.Database ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
		{
			if (((object)ob) == null)
			{
				if (isNullable)
					WriteNullTagLiteral(element, namesp);
				return;
			}

			System.Type type = ob.GetType ();
			if (type == typeof(DbLinq.Schema.Dbml.Database))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

			if (writeWrappingElem) {
				WriteStartElement (element, namesp, ob);
			}

			if (needType) WriteXsiType("Database", "http://schemas.microsoft.com/linqtosql/dbml/2007");

			WriteAttribute ("Name", "", ob.@Name);
			WriteAttribute ("EntityNamespace", "", ob.@EntityNamespace);
			WriteAttribute ("ContextNamespace", "", ob.@ContextNamespace);
			WriteAttribute ("Class", "", ob.@Class);
			if (ob.@AccessModifierSpecified) {
				WriteAttribute ("AccessModifier", "", GetEnumValue_AccessModifier (ob.@AccessModifier));
			}
			if (ob.@ModifierSpecified) {
				WriteAttribute ("Modifier", "", GetEnumValue_ClassModifier (ob.@Modifier));
			}
			WriteAttribute ("BaseType", "", ob.@BaseType);
			WriteAttribute ("Provider", "", ob.@Provider);
			if (ob.@ExternalMappingSpecified) {
				WriteAttribute ("ExternalMapping", "", (ob.@ExternalMapping?"true":"false"));
			}
			if (ob.@SerializationSpecified) {
				WriteAttribute ("Serialization", "", GetEnumValue_SerializationMode (ob.@Serialization));
			}
			WriteAttribute ("EntityBase", "", ob.@EntityBase);

			WriteObject_Connection (ob.@Connection, "Connection", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
			if (ob.@Table != null) {
				for (int n27 = 0; n27 < [email protected]; n27++) {
					WriteObject_Table (ob.@Table[n27], "Table", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
				}
			}
			if (ob.@Function != null) {
				for (int n28 = 0; n28 < [email protected]; n28++) {
					WriteObject_Function (ob.@Function[n28], "Function", "http://schemas.microsoft.com/linqtosql/dbml/2007", false, false, true);
				}
			}
			if (writeWrappingElem) WriteEndElement (ob);
		}