Class PersistedEntityInstanceCache
Inheritance
System.Object
PersistedEntityInstanceCache
Implements
System.IDisposable
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()
Assembly: Xbim.IO.Esent.dll
Syntax
public class PersistedEntityInstanceCache : IDisposable
Constructors
|
Improve this Doc
View Source
PersistedEntityInstanceCache(EsentModel, IEntityFactory)
Declaration
public PersistedEntityInstanceCache(EsentModel model, IEntityFactory factory)
Parameters
Fields
|
Improve this Doc
View Source
CreatedNew
Declaration
protected ConcurrentDictionary<int, IPersistEntity> CreatedNew
Field Value
Type |
Description |
System.Collections.Concurrent.ConcurrentDictionary<System.Int32, IPersistEntity> |
|
|
Improve this Doc
View Source
ModifiedEntities
Declaration
protected ConcurrentDictionary<int, IPersistEntity> ModifiedEntities
Field Value
Type |
Description |
System.Collections.Concurrent.ConcurrentDictionary<System.Int32, IPersistEntity> |
|
Properties
|
Improve this Doc
View Source
AccessMode
Declaration
public XbimDBAccess AccessMode { get; }
Property Value
|
Improve this Doc
View Source
Count
returns the number of instances in the model
Declaration
public long Count { get; }
Property Value
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
HasDatabaseInstance
Declaration
public bool HasDatabaseInstance { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
HighestLabel
returns the value of the highest current entity label
Declaration
public int HighestLabel { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
InstanceHandles
Returns an enumeration of handles to all instances in the database and in the cache
Declaration
public IEnumerable<XbimInstanceHandle> InstanceHandles { get; }
Property Value
|
Improve this Doc
View Source
InstanceLabels
Returns an enumeration of all the instance labels in the model
Declaration
public IEnumerable<int> InstanceLabels { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Int32> |
|
|
Improve this Doc
View Source
Model
Declaration
public EsentModel Model { get; }
Property Value
|
Improve this Doc
View Source
Saved
Declaration
public bool Saved { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
Activate(IPersistEntity)
Declaration
public void Activate(IPersistEntity entity)
Parameters
|
Improve this Doc
View Source
Any<TIfcType>()
Declaration
public bool Any<TIfcType>()
where TIfcType : IPersistEntity
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Name |
Description |
TIfcType |
|
|
Improve this Doc
View Source
Close()
Clears all contents from the cache and closes any connections
Declaration
|
Improve this Doc
View Source
Contains(Int32)
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)
Declaration
public bool Contains(IPersistEntity instance)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
CountOf<TIfcType>()
returns the number of instances of the specified type and its sub types
Declaration
public long CountOf<TIfcType>()
where TIfcType : IPersistEntity
Returns
Type |
Description |
System.Int64 |
|
Type Parameters
Name |
Description |
TIfcType |
|
|
Improve this Doc
View Source
Delete_Reversable(IPersistEntity)
Declaration
public void Delete_Reversable(IPersistEntity instance)
Parameters
|
Improve this Doc
View Source
Dispose()
Declaration
|
Improve this Doc
View Source
Dispose(Boolean)
Declaration
protected void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
|
Improve this Doc
View Source
Finalize()
Declaration
protected void Finalize()
|
Improve this Doc
View Source
ForEach<TSource>(IEnumerable<TSource>, Action<TSource>)
Performs a set of actions on a collection of entities inside a single read only transaction
This improves database performance for retrieving and accessing complex and deep objects
Declaration
public void ForEach<TSource>(IEnumerable<TSource> source, Action<TSource> body)
where TSource : IPersistEntity
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<TSource> |
source |
|
System.Action<TSource> |
body |
|
Type Parameters
|
Improve this Doc
View Source
FreeTable(EsentShapeGeometryCursor)
Free a table. This will cache the table if the cache isn't full
and dispose of it otherwise.
Declaration
public void FreeTable(EsentShapeGeometryCursor table)
Parameters
|
Improve this Doc
View Source
FreeTable(EsentShapeInstanceCursor)
Free a table. This will cache the table if the cache isn't full
and dispose of it otherwise.
Declaration
public void FreeTable(EsentShapeInstanceCursor table)
Parameters
|
Improve this Doc
View Source
FreeTable(XbimGeometryCursor)
Free a table. This will cache the table if the cache isn't full
and dispose of it otherwise.
Declaration
public void FreeTable(XbimGeometryCursor table)
Parameters
|
Improve this Doc
View Source
GetGeometry(Int16, Int32, XbimGeometryType)
Declaration
public IEnumerable<XbimGeometryData> GetGeometry(short typeId, int productLabel, XbimGeometryType geomType)
Parameters
Type |
Name |
Description |
System.Int16 |
typeId |
|
System.Int32 |
productLabel |
|
XbimGeometryType |
geomType |
|
Returns
|
Improve this Doc
View Source
GetGeometryData(XbimGeometryType)
Iterates over all the shape geoemtry
This is a thread safe operation and can be accessed in background threads
Declaration
public IEnumerable<XbimGeometryData> GetGeometryData(XbimGeometryType ofType)
Parameters
Returns
|
Improve this Doc
View Source
GetInstance(Int32, Boolean, Boolean)
Returns an instance of the entity with the specified label,
if the instance has already been loaded it is returned from the cache
if it has not been loaded a blank instance is loaded, i.e. will not have been activated
Declaration
public IPersistEntity GetInstance(int label, bool loadProperties = false, bool unCached = false)
Parameters
Type |
Name |
Description |
System.Int32 |
label |
|
System.Boolean |
loadProperties |
|
System.Boolean |
unCached |
|
Returns
|
Improve this Doc
View Source
GetOrCreateInstanceFromCache(Int32, Type, Byte[])
Looks for this instance in the cache and returns it, if not found it creates a new instance and adds it to the cache
Declaration
public IPersistEntity GetOrCreateInstanceFromCache(int label, Type type, byte[] properties)
Parameters
Type |
Name |
Description |
System.Int32 |
label |
Entity label to create
|
System.Type |
type |
If not null creates an instance of this type, else creates an unknown Ifc Type
|
System.Byte[] |
properties |
if not null populates all properties of the instance
|
Returns
|
Improve this Doc
View Source
ImportIfcXml(String, String, ReportProgressDelegate, Boolean, Boolean)
Imports an Xml file memory model into the model server, only call when the database instances table is empty
Declaration
public void ImportIfcXml(string xbimDbName, string xmlFilename, ReportProgressDelegate progressHandler = null, bool keepOpen = false, bool cacheEntities = false)
Parameters
Type |
Name |
Description |
System.String |
xbimDbName |
|
System.String |
xmlFilename |
|
ReportProgressDelegate |
progressHandler |
|
System.Boolean |
keepOpen |
|
System.Boolean |
cacheEntities |
|
|
Improve this Doc
View Source
ImportModel(IModel, String, ReportProgressDelegate)
Declaration
public void ImportModel(IModel fromModel, string xbimDbName, ReportProgressDelegate progressHandler = null)
Parameters
|
Improve this Doc
View Source
ImportStep(String, String, ReportProgressDelegate, Boolean, Boolean, Int32)
Imports the contents of the ifc file into the named database, the resulting database is closed after success, use LoadStep21 to access
Declaration
public void ImportStep(string xbimDbName, string toImportIfcFilename, ReportProgressDelegate progressHandler = null, bool keepOpen = false, bool cacheEntities = false, int codePageOverride = -1)
Parameters
Type |
Name |
Description |
System.String |
xbimDbName |
|
System.String |
toImportIfcFilename |
|
ReportProgressDelegate |
progressHandler |
|
System.Boolean |
keepOpen |
|
System.Boolean |
cacheEntities |
|
System.Int32 |
codePageOverride |
|
|
Improve this Doc
View Source
ImportZip(String, String, ReportProgressDelegate, Boolean, Boolean, Int32)
Declaration
public void ImportZip(string xbimDbName, string toImportFilename, ReportProgressDelegate progressHandler = null, bool keepOpen = false, bool cacheEntities = false, int codePageOverride = -1)
Parameters
Type |
Name |
Description |
System.String |
xbimDbName |
|
System.String |
toImportFilename |
|
ReportProgressDelegate |
progressHandler |
|
System.Boolean |
keepOpen |
|
System.Boolean |
cacheEntities |
|
System.Int32 |
codePageOverride |
|
|
Improve this Doc
View Source
InstanceHandlesOfType<TIfcType>()
Returns an enumeration of handles to all instances in the database or the cache of specified type
Declaration
public IEnumerable<XbimInstanceHandle> InstanceHandlesOfType<TIfcType>()
Returns
Type Parameters
Name |
Description |
TIfcType |
|
|
Improve this Doc
View Source
InstancesOfTypeCount(Type)
Deprecated. Use CountOf, returns the number of instances of the specified type
Declaration
public long InstancesOfTypeCount(Type t)
Parameters
Type |
Name |
Description |
System.Type |
t |
|
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
Print()
Declaration
|
Improve this Doc
View Source
SaveAs(StorageType, String, ReportProgressDelegate, IDictionary<Int32, Int32>)
Declaration
public void SaveAs(StorageType storageType, string storageFileName, ReportProgressDelegate progress = null, IDictionary<int, int> map = null)
Parameters
Type |
Name |
Description |
StorageType |
storageType |
|
System.String |
storageFileName |
|
ReportProgressDelegate |
progress |
|
System.Collections.Generic.IDictionary<System.Int32, System.Int32> |
map |
|
|
Improve this Doc
View Source
Where<T>(Func<T, Boolean>)
Declaration
public IEnumerable<T> Where<T>(Func<T, bool> condition)
where T : IPersistEntity
Parameters
Type |
Name |
Description |
System.Func<T, System.Boolean> |
condition |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
|
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
Implements
System.IDisposable