Search Results for

    Show / Hide Table of Contents

    Class XbimInstanceCollection

    A class providing access to a collection of in,stances in a model

    Inheritance
    System.Object
    XbimInstanceCollection
    Implements
    IEntityCollection
    IReadOnlyEntityCollection
    System.Collections.Generic.IEnumerable<IPersistEntity>
    System.Collections.IEnumerable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Xbim.IO.Esent
    Assembly: Xbim.IO.Esent.dll
    Syntax
    public class XbimInstanceCollection : IEntityCollection, IReadOnlyEntityCollection, IEnumerable<IPersistEntity>, IEnumerable

    Fields

    | Improve this Doc View Source

    Cache

    Declaration
    protected readonly PersistedEntityInstanceCache Cache
    Field Value
    Type Description
    PersistedEntityInstanceCache

    Properties

    | Improve this Doc View Source

    Count

    Returns the total number of Ifc Instances in this model

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

    Item[Int32]

    Returns an instance from the Model with the corresponding label

    Declaration
    public IPersistEntity this[int label] { get; }
    Parameters
    Type Name Description
    System.Int32 label

    entity label to retrieve

    Property Value
    Type Description
    IPersistEntity
    | Improve this Doc View Source

    LastLabel

    Declaration
    public int LastLabel { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    Contains(Int32)

    Returns true if the instance label is in the current model, Use with care, does not check that the instance is in the current model, only the label exists

    Declaration
    public bool Contains(int entityLabel)
    Parameters
    Type Name Description
    System.Int32 entityLabel
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Contains(IPersistEntity)

    Returns true if the instance is in the current model

    Declaration
    public bool Contains(IPersistEntity instance)
    Parameters
    Type Name Description
    IPersistEntity instance
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CountOf<TIfcType>()

    Returns the count of the number of instances of the specified type

    Declaration
    public long CountOf<TIfcType>()
        where TIfcType : IPersistEntity
    Returns
    Type Description
    System.Int64
    Type Parameters
    Name Description
    TIfcType
    | Improve this Doc View Source

    FirstOrDefault<T>()

    Declaration
    public T FirstOrDefault<T>()
        where T : IPersistEntity
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    FirstOrDefault<T>(Func<T, Boolean>)

    Declaration
    public T FirstOrDefault<T>(Func<T, bool> expr)
        where T : IPersistEntity
    Parameters
    Type Name Description
    System.Func<T, System.Boolean> expr
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    FirstOrDefault<T>(Func<T, Boolean>, String, IPersistEntity)

    Declaration
    public T FirstOrDefault<T>(Func<T, bool> condition, string inverseProperty, IPersistEntity inverseArgument)
        where T : IPersistEntity
    Parameters
    Type Name Description
    System.Func<T, System.Boolean> condition
    System.String inverseProperty
    IPersistEntity inverseArgument
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetFromGeometryLabel(Int32)

    Returns the Ifc entity for a given Geometry Label

    Declaration
    public IPersistEntity GetFromGeometryLabel(int geometryLabel)
    Parameters
    Type Name Description
    System.Int32 geometryLabel
    Returns
    Type Description
    IPersistEntity
    | Improve this Doc View Source

    Handles()

    Returns an enumerabale of all the instance handles in the model

    Declaration
    public IEnumerable<XbimInstanceHandle> Handles()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<XbimInstanceHandle>
    | Improve this Doc View Source

    Handles<T>()

    Returns an enumerable of all handles of the specified type in the model

    Declaration
    public IEnumerable<XbimInstanceHandle> Handles<T>()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<XbimInstanceHandle>
    Type Parameters
    Name Description
    T

    The type of entity required

    | Improve this Doc View Source

    New(Type)

    Creates and returns a new instance of Type t, sets the label to the specificed value. This is a reversabel operation

    Declaration
    public IPersistEntity New(Type t)
    Parameters
    Type Name Description
    System.Type t
    Returns
    Type Description
    IPersistEntity
    | Improve this Doc View Source

    New<TIfcType>()

    Creates a new Ifc Persistent Instance, this is an undoable operation

    Declaration
    public TIfcType New<TIfcType>()
        where TIfcType : IInstantiableEntity
    Returns
    Type Description
    TIfcType
    Type Parameters
    Name Description
    TIfcType

    The Ifc Type, this cannot be an abstract class. An exception will be thrown if the type is not a valid Ifc Type

    | Improve this Doc View Source

    New<TIfcType>(Action<TIfcType>)

    Creates and Instance of TIfcType and initializes the properties in accordance with the lambda expression i.e. Person person = CreateInstance>Person<(p =< { p.FamilyName = "Undefined"; p.GivenName = "Joe"; });

    Declaration
    public TIfcType New<TIfcType>(Action<TIfcType> initPropertiesFunc)
        where TIfcType : IInstantiableEntity
    Parameters
    Type Name Description
    System.Action<TIfcType> initPropertiesFunc
    Returns
    Type Description
    TIfcType
    Type Parameters
    Name Description
    TIfcType
    | Improve this Doc View Source

    OfType(String, Boolean)

    Declaration
    public IEnumerable<IPersistEntity> OfType(string stringType, bool activate)
    Parameters
    Type Name Description
    System.String stringType
    System.Boolean activate
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<IPersistEntity>
    | Improve this Doc View Source

    OfType<TIfc>()

    Declaration
    public IEnumerable<TIfc> OfType<TIfc>()
        where TIfc : IPersistEntity
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TIfc>
    Type Parameters
    Name Description
    TIfc
    | Improve this Doc View Source

    OfType<TIfc>(Boolean)

    Returns all instances in the model of IfcType, IfcType may be an abstract Type

    Declaration
    public IEnumerable<TIfc> OfType<TIfc>(bool activate)
        where TIfc : IPersistEntity
    Parameters
    Type Name Description
    System.Boolean activate

    if true each instance is fullly populated from the database, if false population is deferred until the entity is activated

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TIfc>
    Type Parameters
    Name Description
    TIfc
    | Improve this Doc View Source

    Where<TIfcType>(Func<TIfcType, Boolean>)

    Filters the Ifc Instances based on their Type and the predicate

    Declaration
    public IEnumerable<TIfcType> Where<TIfcType>(Func<TIfcType, bool> expression)
        where TIfcType : IPersistEntity
    Parameters
    Type Name Description
    System.Func<TIfcType, System.Boolean> expression

    function to execute

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TIfcType>
    Type Parameters
    Name Description
    TIfcType

    Ifc Type to filter

    | Improve this Doc View Source

    Where<T>(Func<T, Boolean>, String, IPersistEntity)

    Declaration
    public IEnumerable<T> Where<T>(Func<T, bool> condition, string inverseProperty, IPersistEntity inverseArgument)
        where T : IPersistEntity
    Parameters
    Type Name Description
    System.Func<T, System.Boolean> condition
    System.String inverseProperty
    IPersistEntity inverseArgument
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>
    Type Parameters
    Name Description
    T

    Explicit Interface Implementations

    | Improve this Doc View Source

    IEnumerable<IPersistEntity>.GetEnumerator()

    Declaration
    IEnumerator<IPersistEntity> IEnumerable<IPersistEntity>.GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<IPersistEntity>
    | Improve this Doc View Source

    IEnumerable.GetEnumerator()

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

    Implements

    IEntityCollection
    IReadOnlyEntityCollection
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2022 xbim