Show / Hide Table of Contents

Class EntityCollection

A class that inherits from System.Collections.Generic.IDictionary<TKey, TValue> where TKey is a string and TValue is an entity. This collection is used to store Entity objects by their Handle

Inheritance
System.Object
EntityCollection
Implements
System.Collections.Generic.IDictionary<System.String, Entity>
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, Entity>>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, Entity>>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Dxflib.AcadEntities
Assembly: Dxflib.dll
Syntax
public class EntityCollection : IDictionary<string, Entity>, ICollection<KeyValuePair<string, Entity>>, IEnumerable<KeyValuePair<string, Entity>>, IEnumerable

Constructors

| Improve this Doc View Source

EntityCollection(IReadOnlyCollection<Entity>)

Constructor for the EntityCollection Type. This constructor allocate the backing dictionary with the handles of entities. It will however not link the entities

Declaration
public EntityCollection(IReadOnlyCollection<Entity> entities)
Parameters
Type Name Description
System.Collections.Generic.IReadOnlyCollection<Entity> entities

Properties

| Improve this Doc View Source

Count

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

IsReadOnly

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Item[String]

Declaration
public Entity this[string key] { get; set; }
Parameters
Type Name Description
System.String key
Property Value
Type Description
Entity
| Improve this Doc View Source

Keys

Declaration
public ICollection<string> Keys { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<System.String>
| Improve this Doc View Source

Values

Declaration
public ICollection<Entity> Values { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<Entity>

Methods

| Improve this Doc View Source

Add(KeyValuePair<String, Entity>)

Declaration
public void Add(KeyValuePair<string, Entity> item)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.String, Entity> item
| Improve this Doc View Source

Add(String, Entity)

Declaration
public void Add(string handle, Entity entity)
Parameters
Type Name Description
System.String handle

The Entity Handle

Entity entity

The Entity

| Improve this Doc View Source

Clear()

Declaration
public void Clear()
| Improve this Doc View Source

Contains(KeyValuePair<String, Entity>)

Declaration
public bool Contains(KeyValuePair<string, Entity> item)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.String, Entity> item
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ContainsKey(String)

Declaration
public bool ContainsKey(string handle)
Parameters
Type Name Description
System.String handle
Returns
Type Description
System.Boolean
| Improve this Doc View Source

CopyTo(KeyValuePair<String, Entity>[], Int32)

Declaration
public void CopyTo(KeyValuePair<string, Entity>[] array, int arrayIndex)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.String, Entity>[] array
System.Int32 arrayIndex
| Improve this Doc View Source

GetEntitiesByType<T>()

Returns a list of entities that match the type given

Declaration
public List<T> GetEntitiesByType<T>()
Returns
Type Description
System.Collections.Generic.List<T>

A list of entities

Type Parameters
Name Description
T

The return type of the entities

| Improve this Doc View Source

GetEnumerator()

Declaration
public IEnumerator<KeyValuePair<string, Entity>> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, Entity>>
| Improve this Doc View Source

Remove(KeyValuePair<String, Entity>)

Declaration
public bool Remove(KeyValuePair<string, Entity> item)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.String, Entity> item
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Remove(String)

Declaration
public bool Remove(string handle)
Parameters
Type Name Description
System.String handle

The Entity Handle

Returns
Type Description
System.Boolean
| Improve this Doc View Source

TryGetValue(String, out Entity)

Declaration
public bool TryGetValue(string handle, out Entity entity)
Parameters
Type Name Description
System.String handle
Entity entity
Returns
Type Description
System.Boolean

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX