Show / Hide Table of Contents

Interface IResourceCollection<TSelf, TModel, TResource>

The stateful model collection interface.

Inherited Members
IResourceCollection.Client
IResourceCollection.GraphClient
IResourceCollection.GraphLogger
IResourceCollection.TerminateAsync(TimeSpan)
System.IDisposable.Dispose()
System.Collections.Generic.IReadOnlyCollection<TModel>.Count
System.Collections.Generic.IEnumerable<TModel>.GetEnumerator()
Namespace: Microsoft.Graph.StatefulClient
Assembly: Microsoft.Graph.StatefulClient.dll
Syntax
public interface IResourceCollection<out TSelf, TModel, in TResource> : IResourceCollection, IDisposable, IReadOnlyCollection<TModel>, IEnumerable<TModel>, IEnumerable where TSelf : IResourceCollection<TSelf, TModel, TResource> where TModel : IResource<TModel, TResource> where TResource : Entity
Type Parameters
Name Description
TSelf

The self type of the collection.

TModel

The containing stateful resource type. IResource<TSelf, TResource>

TResource

The containing resource type. Entity

Properties

View Source

Item[String]

The resource at the specified index.

Declaration
TModel this[string id] { get; }
Parameters
Type Name Description
System.String id

The index id.

Property Value
Type Description
TModel

The IResource<TSelf, TResource>.

Methods

View Source

TryForceRemove(String, out TModel)

Attempts to remove and return the value that has the specified id from the IResourceCollection<TSelf, TModel, TResource>. This will force remove the object, if for whatever reason it cannot be removed by the service. It should only be used as a last resort to clean up stale resources.

Declaration
bool TryForceRemove(string id, out TModel model)
Parameters
Type Name Description
System.String id

The identifier.

TModel model

The model.

Returns
Type Description
System.Boolean

true if the object was removed successfully; otherwise, false.

Events

View Source

OnUpdated

Event triggered whenever a resource is updated from the collection.

Declaration
event CollectionEventHandler<TSelf, TModel> OnUpdated
Event Type
Type Description
CollectionEventHandler<TSelf, TModel>

Extension Methods

GraphModelExtensions.SetInAdditionalData(Object, String, Object)

See Also

IResourceCollection
System.Collections.Generic.IReadOnlyCollection<T>
  • View Source
Back to top Generated by DocFX