{!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 ServicesCollectionExtensions | App UI | 0.5.5
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ServicesCollectionExtensions

    Extension methods for IServiceCollection.

    Inheritance
    object
    ServicesCollectionExtensions
    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 static class ServicesCollectionExtensions

    Methods

    Name Description
    AddSingleton(IServiceCollection, Type)

    Adds a singleton service of the type specified in serviceType to the specified IServiceCollection.

    AddSingleton(IServiceCollection, Type, Type)

    Adds a singleton service of the type specified in serviceType with an implementation type specified in implementationType to the specified IServiceCollection.

    AddSingleton<T>(IServiceCollection)

    Adds a singleton service of the type specified in T to the specified IServiceCollection.

    AddSingleton<TService, TImplementation>(IServiceCollection)

    Adds a singleton service of the type specified in TService with an implementation type specified in TImplementation to the specified IServiceCollection.

    AddTransient(IServiceCollection, Type)

    Adds a transient service of the type specified in serviceType to the specified IServiceCollection.

    AddTransient(IServiceCollection, Type, Type)

    Adds a transient service of the type specified in serviceType with an implementation type specified in implementationType to the specified IServiceCollection.

    AddTransient<T>(IServiceCollection)

    Adds a transient service of the type specified in T to the specified

    AddTransient<TService, TImplementation>(IServiceCollection)

    Adds a transient service of the type specified in TService with an implementation type specified in TImplementation to the specified IServiceCollection.

    BuildServiceProvider(IServiceCollection)

    Builds a IServiceProvider from the IServiceCollection.

    TryAddSingleton<TService>(IServiceCollection)

    Adds a transient service of the type specified in TService to the specified IServiceCollection.

    TryAddSingleton<TService, TImplementation>(IServiceCollection)

    Adds a transient service of the type specified in TService with an implementation type specified in TImplementation to the specified 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)