当前位置: 首页>>代码示例>>C#>>正文


C# Mono.GetType方法代码示例

本文整理汇总了C#中Mono.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# Mono.GetType方法的具体用法?C# Mono.GetType怎么用?C# Mono.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mono的用法示例。


在下文中一共展示了Mono.GetType方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WriteObject_AddinSystemConfiguration

		void WriteObject_AddinSystemConfiguration (Mono.Addins.Setup.AddinSystemConfiguration 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(Mono.Addins.Setup.AddinSystemConfiguration))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

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

			if (needType) WriteXsiType("AddinSystemConfiguration", "");

			if ([email protected] != null) {
				WriteStartElement ("Repositories", "", [email protected]);
				for (int n22 = 0; n22 < [email protected]; n22++) {
					WriteObject_RepositoryRecord (((Mono.Addins.Setup.RepositoryRecord) [email protected][n22]), "Repository", "", false, false, true);
				}
				WriteEndElement ([email protected]);
			}
			WriteElementString ("RepositoryIdCount", "", [email protected](CultureInfo.InvariantCulture));
			if ([email protected] != null) {
				WriteStartElement ("DisabledAddins", "", [email protected]);
				for (int n23 = 0; n23 < [email protected]; n23++) {
					WriteElementString ("Addin", "", [email protected][n23]);
				}
				WriteEndElement ([email protected]);
			}
			if ([email protected] != null) {
				WriteStartElement ("AddinPaths", "", [email protected]);
				for (int n24 = 0; n24 < [email protected]; n24++) {
					WriteElementString ("Addin", "", [email protected][n24]);
				}
				WriteEndElement ([email protected]);
			}
			if (writeWrappingElem) WriteEndElement (ob);
		}
开发者ID:wanglehui,项目名称:mono-addins,代码行数:46,代码来源:AddinSystemConfigurationReaderWriter.cs

示例2: WriteObject_RepositoryRecord

		void WriteObject_RepositoryRecord (Mono.Addins.Setup.RepositoryRecord 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(Mono.Addins.Setup.RepositoryRecord))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

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

			if (needType) WriteXsiType("RepositoryRecord", "");

			WriteAttribute ("id", "", [email protected]);

			WriteElementString ("IsReference", "", ([email protected]?"true":"false"));
			WriteElementString ("File", "", [email protected]);
			WriteElementString ("Url", "", [email protected]);
			WriteElementString ("Name", "", [email protected]);
			WriteElementString ("LastModified", "", XmlConvert.ToString ([email protected], XmlDateTimeSerializationMode.RoundtripKind));
			if ([email protected] != true) {
				WriteElementString ("Enabled", "", ([email protected]?"true":"false"));
			}
			if (writeWrappingElem) WriteEndElement (ob);
		}
开发者ID:wanglehui,项目名称:mono-addins,代码行数:34,代码来源:AddinSystemConfigurationReaderWriter.cs

示例3: WriteObject_AssemblyDependency

		void WriteObject_AssemblyDependency (Mono.Addins.Description.AssemblyDependency 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(Mono.Addins.Description.AssemblyDependency))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

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

			if (needType) WriteXsiType("AssemblyDependency", "");

			WriteElementString ("FullName", "", [email protected]);
			WriteElementString ("Package", "", [email protected]);
			if (writeWrappingElem) WriteEndElement (ob);
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:26,代码来源:RepositoryReaderWriter.cs

示例4: WriteObject_AddinReference

		void WriteObject_AddinReference (Mono.Addins.Description.AddinDependency 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(Mono.Addins.Description.AddinDependency))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

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

			if (needType) WriteXsiType("AddinReference", "");

			WriteElementString ("AddinId", "", [email protected]);
			WriteElementString ("Version", "", [email protected]);
			if (writeWrappingElem) WriteEndElement (ob);
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:26,代码来源:RepositoryReaderWriter.cs

示例5: WriteObject_AddinRepositoryEntry

		void WriteObject_AddinRepositoryEntry (Mono.Addins.Setup.PackageRepositoryEntry 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(Mono.Addins.Setup.PackageRepositoryEntry))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

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

			if (needType) WriteXsiType("PackageRepositoryEntry", "");

			WriteElementString ("Url", "", [email protected]);
			WriteObject_AddinInfo ([email protected], "Addin", "", false, false, true);
			if (writeWrappingElem) WriteEndElement (ob);
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:26,代码来源:RepositoryReaderWriter.cs

示例6: WriteObject_AddinInfo

		void WriteObject_AddinInfo (Mono.Addins.Setup.AddinInfo 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(Mono.Addins.Setup.AddinInfo))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

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

			if (needType) WriteXsiType("AddinInfo", "");

			WriteElementString ("Id", "", [email protected]);
			WriteElementString ("Namespace", "", [email protected]);
			WriteElementString ("Name", "", [email protected]);
			WriteElementString ("Version", "", [email protected]);
			WriteElementString ("BaseVersion", "", [email protected]);
			WriteElementString ("Author", "", [email protected]);
			WriteElementString ("Copyright", "", [email protected]);
			WriteElementString ("Url", "", [email protected]);
			WriteElementString ("Description", "", [email protected]);
			WriteElementString ("Category", "", [email protected]);
			if ([email protected] != null) {
				WriteStartElement ("Dependencies", "", [email protected]);
				for (int n32 = 0; n32 < [email protected]; n32++) {
					if (((object)[email protected][n32]) == null) { }
					else if ([email protected][n32].GetType() == typeof(Mono.Addins.Description.AssemblyDependency)) {
						WriteObject_AssemblyDependency (((Mono.Addins.Description.AssemblyDependency) [email protected][n32]), "AssemblyDependency", "", false, false, true);
					}
					else if ([email protected][n32].GetType() == typeof(Mono.Addins.Description.NativeDependency)) {
						WriteObject_NativeReference (((Mono.Addins.Description.NativeDependency) [email protected][n32]), "NativeDependency", "", false, false, true);
					}
					else if ([email protected][n32].GetType() == typeof(Mono.Addins.Description.AddinDependency)) {
						WriteObject_AddinReference (((Mono.Addins.Description.AddinDependency) [email protected][n32]), "AddinDependency", "", false, false, true);
					}
					else throw CreateUnknownTypeException ([email protected][n32]);
				}
				WriteEndElement ([email protected]);
			}
			if ([email protected] != null) {
				WriteStartElement ("OptionalDependencies", "", [email protected]);
				for (int n33 = 0; n33 < [email protected]; n33++) {
					if (((object)[email protected][n33]) == null) { }
					else if ([email protected][n33].GetType() == typeof(Mono.Addins.Description.AssemblyDependency)) {
						WriteObject_AssemblyDependency (((Mono.Addins.Description.AssemblyDependency) [email protected][n33]), "AssemblyDependency", "", false, false, true);
					}
					else if ([email protected][n33].GetType() == typeof(Mono.Addins.Description.NativeDependency)) {
						WriteObject_NativeReference (((Mono.Addins.Description.NativeDependency) [email protected][n33]), "NativeDependency", "", false, false, true);
					}
					else if ([email protected][n33].GetType() == typeof(Mono.Addins.Description.AddinDependency)) {
						WriteObject_AddinReference (((Mono.Addins.Description.AddinDependency) [email protected][n33]), "AddinDependency", "", false, false, true);
					}
					else throw CreateUnknownTypeException ([email protected][n33]);
				}
				WriteEndElement ([email protected]);
			}
			if (writeWrappingElem) WriteEndElement (ob);
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:68,代码来源:RepositoryReaderWriter.cs

示例7: WriteObject_ReferenceRepositoryEntry

		void WriteObject_ReferenceRepositoryEntry (Mono.Addins.Setup.ReferenceRepositoryEntry 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(Mono.Addins.Setup.ReferenceRepositoryEntry))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

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

			if (needType) WriteXsiType("ReferenceRepositoryEntry", "");

			WriteElementString ("Url", "", [email protected]);
			WriteElementString ("LastModified", "", [email protected]("yyyy-MM-ddTHH:mm:ss.fffffffzzz", CultureInfo.InvariantCulture));
			if (writeWrappingElem) WriteEndElement (ob);
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:26,代码来源:RepositoryReaderWriter.cs

示例8: WriteObject_Repository

		void WriteObject_Repository (Mono.Addins.Setup.Repository 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(Mono.Addins.Setup.Repository))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

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

			if (needType) WriteXsiType("Repository", "");

			WriteElementString ("Name", "", [email protected]);
			WriteElementString ("Url", "", [email protected]);
			if ([email protected] != null) {
				for (int n30 = 0; n30 < [email protected]; n30++) {
					WriteObject_ReferenceRepositoryEntry (((Mono.Addins.Setup.ReferenceRepositoryEntry) [email protected][n30]), "Repository", "", false, false, true);
				}
			}
			if ([email protected] != null) {
				for (int n31 = 0; n31 < [email protected]; n31++) {
					WriteObject_AddinRepositoryEntry (((Mono.Addins.Setup.PackageRepositoryEntry) [email protected][n31]), "Addin", "", false, false, true);
				}
			}
			if (writeWrappingElem) WriteEndElement (ob);
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:36,代码来源:RepositoryReaderWriter.cs

示例9: Matches

 static bool Matches (Mono.Upnp.Dcp.MediaServer1.ContentDirectory1.Object @object, Action<QueryVisitor> query)
 {
     var match = false;
     query (new ObjectQueryVisitor (new ObjectQueryContext (@object.GetType ()), @object, result => {
         if (match) {
             Assert.Fail ("Multiple matches for a single input.");
         }
         match = true;
     }));
     return match;
 }
开发者ID:pacificIT,项目名称:mono-upnp,代码行数:11,代码来源:ObjectQueryTests.cs

示例10: WriteObject_AddinProperty

		void WriteObject_AddinProperty (Mono.Addins.Description.AddinProperty 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(Mono.Addins.Description.AddinProperty))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

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

			if (needType) WriteXsiType("AddinProperty", "");

			WriteAttribute ("name", "", [email protected]);
			WriteAttribute ("locale", "", [email protected]);

			WriteValue ([email protected]);
			if (writeWrappingElem) WriteEndElement (ob);
		}
开发者ID:wanglehui,项目名称:mono-addins,代码行数:28,代码来源:RepositoryReaderWriter.cs

示例11: WriteObject_ReferenceRepositoryEntry

		void WriteObject_ReferenceRepositoryEntry (Mono.Addins.Setup.ReferenceRepositoryEntry 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(Mono.Addins.Setup.ReferenceRepositoryEntry))
			{ }
			else {
				throw CreateUnknownTypeException (ob);
			}

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

			if (needType) WriteXsiType("ReferenceRepositoryEntry", "");

			WriteElementString ("Url", "", [email protected]);
			WriteElementString ("LastModified", "", XmlConvert.ToString ([email protected], XmlDateTimeSerializationMode.RoundtripKind));
			if (writeWrappingElem) WriteEndElement (ob);
		}
开发者ID:wanglehui,项目名称:mono-addins,代码行数:26,代码来源:RepositoryReaderWriter.cs


注:本文中的Mono.GetType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。