/// <summary> /// Gets an array of entities that are of a given class. /// </summary> /// <param name="className">The entity class to search for.</param> /// <returns>An array of entities.</returns> public static IEnumerable <EntityBase> GetByClass(string className) { #if !(RELEASE && RELEASE_DISABLE_CHECKS) if (String.IsNullOrEmpty(className)) { throw new ArgumentException("className should not be null or empty", "className"); } #endif return(GetEntitiesCommon <Entity>(NativeEntityMethods.GetEntitiesByClass(className))); }
/// <summary> /// Gets an array of entities that are of a given class. /// </summary> /// <typeparam name="T">The entity class to search for.</typeparam> /// <returns>An array of entities of type T.</returns> public static IEnumerable <T> GetByClass <T>() where T : EntityBase { return(GetEntitiesCommon <T>(NativeEntityMethods.GetEntitiesByClass(typeof(T).Name))); }