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


C# Model.Equals方法代码示例

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


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

示例1: IsConnectedTo

		public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK)
		{
			if (objectType.Equals(Model.Entities.ObjectType.Brand) && this.K == objectK)
				return true;

			if (objectType.Equals(Model.Entities.ObjectType.Group) && this.GroupK == objectK)
				return true;

			if (Group.CanBeConnectedToStatic(objectType) && this.Group.IsConnectedTo(objectType, objectK))
				return true;

			return false;
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:13,代码来源:Brand.cs

示例2: CanBeConnectedToStatic

		public static bool CanBeConnectedToStatic(Model.Entities.ObjectType o)
		{
			if (o.Equals(Model.Entities.ObjectType.Group))
				return true;

			if (Group.CanBeConnectedToStatic(o))
				return true;

			return false;
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:Brand.cs

示例3: CanBeConnectedToStatic

		public static bool CanBeConnectedToStatic(Model.Entities.ObjectType o)
		{
			if (o.Equals(Model.Entities.ObjectType.Event) ||
				o.Equals(Model.Entities.ObjectType.Article))
				return true;

			if (Event.CanBeConnectedToStatic(o))
				return true;

			if (Article.CanBeConnectedToStatic(o))
				return true;

			return false;
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:14,代码来源:Gallery.cs

示例4: IsConnectedTo

		public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK)
		{
			if (objectType.Equals(Model.Entities.ObjectType.Photo) && this.K == objectK)
				return true;

			if (objectType.Equals(Model.Entities.ObjectType.Gallery) && this.GalleryK == objectK)
				return true;

			if (this.EventK > 0)
			{
				if (objectType.Equals(Model.Entities.ObjectType.Event) && this.EventK == objectK)
					return true;

				if (Event.CanBeConnectedToStatic(objectType) && this.Event.IsConnectedTo(objectType, objectK))
					return true;
			}
			else if (this.ArticleK > 0)
			{
				if (objectType.Equals(Model.Entities.ObjectType.Article) && this.ArticleK == objectK)
					return true;

				if (Article.CanBeConnectedToStatic(objectType) && this.Article.IsConnectedTo(objectType, objectK))
					return true;
			}

			return false;
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:27,代码来源:Photo.cs

示例5: IsConnectedTo

		public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK)
		{
			return objectType.Equals(Model.Entities.ObjectType.Country) && this.K == objectK;
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:4,代码来源:Country.cs

示例6: IsConnectedTo

		public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK)
		{
			if (objectType.Equals(Model.Entities.ObjectType.Article) && this.K == objectK)
				return true;

			if (this.ParentObject is IConnectedTo)
			{
				IConnectedTo parent = (IConnectedTo)this.ParentObject;

				if (objectType.Equals(this.ParentObjectType) && this.ParentObjectK == objectK)
					return true;

				if (parent.CanBeConnectedTo(objectType) && parent.IsConnectedTo(objectType, objectK))
					return true;
			}

			return false;
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:18,代码来源:Article.cs

示例7: CanBeConnectedToStatic

		public static bool CanBeConnectedToStatic(Model.Entities.ObjectType o)
		{
			if (o.Equals(Model.Entities.ObjectType.Country))
				return true;

			return false;
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:7,代码来源:Place.cs

示例8: IsConnectedTo

		public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK)
		{
			if (objectType.Equals(Model.Entities.ObjectType.Place) && this.K == objectK)
				return true;

			if (objectType.Equals(Model.Entities.ObjectType.Country) && this.CountryK == objectK)
				return true;

			return false;
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:Place.cs

示例9: IsConnectedTo

		public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK)
		{
			if (objectType.Equals(Model.Entities.ObjectType.Group) && this.K == objectK)
				return true;

			if (objectType.Equals(Model.Entities.ObjectType.Brand) && this.BrandK == objectK) //This is to stop a circular reference
				return true;

			if (this.PlaceK > 0)
			{
				if (objectType.Equals(Model.Entities.ObjectType.Place) && this.PlaceK == objectK)
					return true;

				if (Place.CanBeConnectedToStatic(objectType) && this.Place.IsConnectedTo(objectType, objectK))
					return true;
			}
			else if (this.CountryK > 0)
			{
				if (objectType.Equals(Model.Entities.ObjectType.Country) && this.CountryK == objectK)
					return true;
			}
			
			return false;
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:24,代码来源:Group.cs


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