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


C# ItemCollection.GetItems方法代码示例

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


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

示例1: CanonicalContainer

        public CanonicalContainer(ItemCollection source, EdmTypeConverter converter)
        {
            this.converter = converter;
            this.containers = source.GetItems<EntityContainer>().ToList();

            this.entities = new Lazy<ReadOnlyCollection<EntityInfo>>(() =>
                this.GetEntities()
                    .ToList()
                    .AsReadOnly());

            this.associations = new Lazy<ReadOnlyCollection<AssociationInfo>>(() =>
                this.GetAssociations()
                    .ToList()
                    .AsReadOnly());
        }
开发者ID:CodingGorilla,项目名称:effort,代码行数:15,代码来源:CanonicalContainer.cs

示例2: GetSubtypesOf

 /// <summary>
 /// Returns the subtype of the EntityType in the current itemCollection
 /// </summary>
 public IEnumerable<EntityType> GetSubtypesOf(EntityType type, ItemCollection itemCollection, bool includeAbstractTypes)
 {
     if (type != null)
     {
         IEnumerable<EntityType> typesInCollection = itemCollection.GetItems<EntityType>();
         foreach (EntityType typeInCollection in typesInCollection)
         {
             if (type.Equals(typeInCollection) == false && this.IsSubtypeOf(typeInCollection, type))
             {
                 if (includeAbstractTypes || !typeInCollection.Abstract)
                 {
                     yield return typeInCollection;
                 }
             }
         }
     }
 }
开发者ID:KCL5South,项目名称:KCLTextTemplating,代码行数:20,代码来源:MetadataTools.cs

示例3: ContainsCascadeDeleteAssociation

 /// <summary>
 /// True if this entity type participates in any relationships where the other end has an OnDelete
 /// cascade delete defined, or if it is the dependent in any identifying relationships
 /// </summary>
 private bool ContainsCascadeDeleteAssociation(ItemCollection itemCollection, EntityType entity)
 {
     return itemCollection.GetItems<AssociationType>().Where(a =>
             ((RefType)a.AssociationEndMembers[0].TypeUsage.EdmType).ElementType == entity && IsCascadeDeletePrincipal(a.AssociationEndMembers[1]) ||
             ((RefType)a.AssociationEndMembers[1].TypeUsage.EdmType).ElementType == entity && IsCascadeDeletePrincipal(a.AssociationEndMembers[0])).Any();
 }
开发者ID:KCL5South,项目名称:KCLTextTemplating,代码行数:10,代码来源:MetadataTools.cs

示例4: IncomingPackets_EquippedMobAddedEvent

 private static void IncomingPackets_EquippedMobAddedEvent(int client, Mobile mobile, ItemCollection equipment)
 {
     ClientInfo ci;
     if (ClientInfoCollection.GetClient(client, out ci))
     {
         foreach (Item i in equipment.GetItems())
         {
             mobile.SetLayer((int)i.Layer, i.Serial);
             ci.Items.Add(i);
         }
         PlayerMobile p = ci.Player;
         if (p != null && mobile.Serial == p.Serial)
         {
             p.Status = mobile.myStatus;
             p.ID = mobile.myID;
             p.X = mobile.myX;
             p.Y = mobile.myY;
             p.Z = mobile.myZ;
             p.Direction = mobile.myDirection;
             p.Hue = mobile.myHue;
             p.Notoriety = mobile.myNotoriety;
             p.myLayerArray = mobile.myLayerArray;
         }
         else
         {
             //mobile.Equipment = equipment;
             ci.Mobiles.Add(mobile);
         }
     }
 }
开发者ID:FreeReign,项目名称:UOMachine,代码行数:30,代码来源:IncomingPacketHandler.cs


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