Server.Mobiles.GenericBuyInfo.GetDisplayEntity C# (CSharp) Méthode

GetDisplayEntity() public méthode

public GetDisplayEntity ( ) : IEntity
Résultat IEntity
		public IEntity GetDisplayEntity()
		{
			if ( m_DisplayEntity != null && !IsDeleted( m_DisplayEntity ) )
				return m_DisplayEntity;

			bool canCache = this.CanCacheDisplay;

			if ( canCache )
				m_DisplayEntity = DisplayCache.Cache.Lookup( m_Type );

			if ( m_DisplayEntity == null || IsDeleted( m_DisplayEntity ) )
				m_DisplayEntity = GetEntity();

			DisplayCache.Cache.Store( m_Type, m_DisplayEntity, canCache );

			return m_DisplayEntity;
		}

Usage Example

Exemple #1
0
        private GenericBuyInfo LookupDisplayObject(object obj)
        {
            IBuyItemInfo[] buyInfo = this.GetBuyInfo();

            for (int i = 0; i < buyInfo.Length; ++i)
            {
                GenericBuyInfo gbi = (GenericBuyInfo)buyInfo[i];

                if (gbi.GetDisplayEntity() == obj)
                {
                    return(gbi);
                }
            }

            return(null);
        }
All Usage Examples Of Server.Mobiles.GenericBuyInfo::GetDisplayEntity