本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例5: IsConnectedTo
public bool IsConnectedTo(Model.Entities.ObjectType objectType, int objectK)
{
return objectType.Equals(Model.Entities.ObjectType.Country) && this.K == objectK;
}
示例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;
}
示例7: CanBeConnectedToStatic
public static bool CanBeConnectedToStatic(Model.Entities.ObjectType o)
{
if (o.Equals(Model.Entities.ObjectType.Country))
return true;
return false;
}
示例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;
}
示例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;
}