    

 ## On this page

  

 

 # Class ItemsContainerModelBase&lt;TObject\\&gt;

 Last update: 16.07.2025 

Namespace: [VM.Models.Pre.Drivetrain.VehicleSimulator](VM.Models.Pre.Drivetrain.VehicleSimulator.md)  
Assembly: VM.Models.Pre.Drivetrain.VehicleSimulator.dll

```csharp
public abstract class ItemsContainerModelBase<TObject> : ValidatableBase, IObservableObject, IDisposableObject, IValidatable where TObject : class, IHasGuid, IDisposable

```

#### Type Parameters

`TObject`

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← ObservableObject ← ValidatableBase ← [ItemsContainerModelBase&lt;TObject&gt;](VM.Models.Pre.Drivetrain.VehicleSimulator.ItemsContainerModelBase-1.md)

#### Implements

IObservableObject, IDisposableObject, IValidatable

#### Inherited Members

ValidatableBase.RaisePropertyChanged(string), ValidatableBase.SuspendValidate(), ValidatableBase.Validate(), ValidatableBase.Validate(ValidationContext), ValidatableBase.DisposeManagedResources(), ValidatableBase.CanValidate, ValidatableBase.Errors, ValidatableBase.HasValidationAttribute, ValidatableBase.HasValidator, ValidatableBase.IsValid, ValidatableBase.ValidateTrigger, ValidatableBase.ErrorsChanged, ObservableObject.Dispose(), ObservableObject.RaisePropertyChanged(string), ObservableObject.RaisePropertyChanged(string, object, object), ObservableObject.Dispose(bool), ObservableObject.DisposeManagedResources(), ObservableObject.DisposeUnmanagedResources(), ObservableObject.IsDisposed, ObservableObject.TryDisposing, ObservableObject.Disposed, ObservableObject.Disposing, ObservableObject.PropertyChanged

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkedObjects&lt;T&gt;(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### ItemsContainerModelBase()

```csharp
[JsonConstructor]
public ItemsContainerModelBase()

```

## Fields

### cleanUpTarget

```csharp
protected readonly CompositeDisposable cleanUpTarget

```

#### Field Value

CompositeDisposable

## Properties

### All

```csharp
[JsonIgnore]
public IConnectableObservable<IChangeSet<TObject, Guid>> All { get; }

```

#### Property Value

IConnectableObservable&lt;IChangeSet&lt;TObject, [Guid](https://learn.microsoft.com/dotnet/api/system.guid)&gt;&gt;

### Items

```csharp
[JsonIgnore]
protected IObservableCollection<TObject> Items { get; }

```

#### Property Value

IObservableCollection&lt;TObject&gt;

### ItemsCount

```csharp
[JsonIgnore]
public int ItemsCount { get; }

```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### ObservableItems

```csharp
[JsonIgnore]
public IObservable<IChangeSet<TObject, Guid>> ObservableItems { get; }

```

#### Property Value

[IObservable](https://learn.microsoft.com/dotnet/api/system.iobservable-1)&lt;IChangeSet&lt;TObject, [Guid](https://learn.microsoft.com/dotnet/api/system.guid)&gt;&gt;

### this\[int\]

```csharp
public TObject this[int index] { get; }

```

#### Property Value

TObject

## Methods

### AddItem(TObject)

```csharp
public virtual void AddItem(TObject item)

```

#### Parameters

`item` TObject

### Contains(Guid)

```csharp
public bool Contains(Guid key)

```

#### Parameters

`key` [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### Contains(TObject)

```csharp
public bool Contains(TObject item)

```

#### Parameters

`item` TObject

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### DisposeManagedResources()

```csharp
protected override void DisposeManagedResources()

```

### RemoveItem(Guid)

```csharp
public void RemoveItem(Guid key)

```

#### Parameters

`key` [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

### TryGetItem(Guid, out TObject)

```csharp
public bool TryGetItem(Guid key, out TObject item)

```

#### Parameters

`key` [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

`item` TObject

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)