當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。