{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class ServiceCollection | App UI | 0.5.5
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ServiceCollection

    Default implementation of IServiceCollection.

    Inheritance
    object
    ServiceCollection
    AppUIServiceCollection
    Implements
    IServiceCollection
    IList<ServiceDescriptor>
    ICollection<ServiceDescriptor>
    IEnumerable<ServiceDescriptor>
    IEnumerable
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.AppUI.MVVM
    Assembly: solution.dll
    Syntax
    public class ServiceCollection : IServiceCollection, IList<ServiceDescriptor>, ICollection<ServiceDescriptor>, IEnumerable<ServiceDescriptor>, IEnumerable

    Properties

    Name Description
    Count

    The number of services in the collection.

    IsReadOnly

    The collection is not read-only.

    this[int]

    Get or set a service in the collection.

    Methods

    Name Description
    Add(ServiceDescriptor)

    Add a service to the collection.

    Clear()

    Clear all services from the collection.

    Contains(ServiceDescriptor)

    Check if the collection contains a service.

    CopyTo(ServiceDescriptor[], int)

    Copy the services to an array.

    GetEnumerator()

    Get an enumerator for the services.

    IndexOf(ServiceDescriptor)

    Get the index of a service in the collection.

    Insert(int, ServiceDescriptor)

    Insert a service into the collection.

    Remove(ServiceDescriptor)

    Remove a service from the collection.

    RemoveAt(int)

    Remove a service from the collection.

    Extension Methods

    ServicesCollectionExtensions.AddSingleton(IServiceCollection, Type)
    ServicesCollectionExtensions.AddSingleton(IServiceCollection, Type, Type)
    ServicesCollectionExtensions.AddSingleton<T>(IServiceCollection)
    ServicesCollectionExtensions.AddSingleton<TService, TImplementation>(IServiceCollection)
    ServicesCollectionExtensions.AddTransient(IServiceCollection, Type)
    ServicesCollectionExtensions.AddTransient(IServiceCollection, Type, Type)
    ServicesCollectionExtensions.AddTransient<T>(IServiceCollection)
    ServicesCollectionExtensions.AddTransient<TService, TImplementation>(IServiceCollection)
    ServicesCollectionExtensions.BuildServiceProvider(IServiceCollection)
    ServicesCollectionExtensions.TryAddSingleton<TService>(IServiceCollection)
    ServicesCollectionExtensions.TryAddSingleton<TService, TImplementation>(IServiceCollection)
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)