/
veer
/
Zaya.Translator
Обзор
Документация
Войти
/
veer
/
Zaya.Translator
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
docs/api/Microsoft.Extensions.DependencyInjection.MemoryTranslatorCacheServiceCollectionExtensions.html
205 строк
10 KB
Vladimir Makarov
Extract TranslatorCache as a separate interface and Memory plugin.
01 авг 2026, 22:01
01 авг 2026, 22:01
d289f8b
Код
Авторство
О чём код?
<!DOCTYPE html> <!--[if IE]><![endif]--> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Class MemoryTranslatorCacheServiceCollectionExtensions </title> <meta name="viewport" content="width=device-width"> <meta name="title" content="Class MemoryTranslatorCacheServiceCollectionExtensions "> <meta name="description" content="Extension methods for registering the memory translator-cache engine."> <link rel="shortcut icon" href="../favicon.ico"> <link rel="stylesheet" href="../styles/docfx.vendor.min.css"> <link rel="stylesheet" href="../styles/docfx.css"> <link rel="stylesheet" href="../styles/main.css"> <meta property="docfx:navrel" content="../toc.html"> <meta property="docfx:tocrel" content="toc.html"> </head> <body data-spy="scroll" data-target="#affix" data-offset="120"> <div id="wrapper"> <header> <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="../index.html"> <img id="logo" class="svg" src="../logo.svg" alt=""> </a> </div> <div class="collapse navbar-collapse" id="navbar"> <form class="navbar-form navbar-right" role="search" id="search"> <div class="form-group"> <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off"> </div> </form> </div> </div> </nav> <div class="subnav navbar navbar-default"> <div class="container hide-when-search" id="breadcrumb"> <ul class="breadcrumb"> <li></li> </ul> </div> </div> </header> <div role="main" class="container body-content hide-when-search"> <div class="sidenav hide-when-search"> <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a> <div class="sidetoggle collapse" id="sidetoggle"> <div id="sidetoc"></div> </div> </div> <div class="article row grid-right"> <div class="col-md-10"> <article class="content wrap" id="_content" data-uid="Microsoft.Extensions.DependencyInjection.MemoryTranslatorCacheServiceCollectionExtensions"> <h1 id="Microsoft_Extensions_DependencyInjection_MemoryTranslatorCacheServiceCollectionExtensions" data-uid="Microsoft.Extensions.DependencyInjection.MemoryTranslatorCacheServiceCollectionExtensions" class="text-break">Class MemoryTranslatorCacheServiceCollectionExtensions</h1> <div class="markdown level0 summary"><p>Extension methods for registering the memory translator-cache engine.</p> </div> <div class="markdown level0 conceptual"></div> <div class="inheritance"> <h5>Inheritance</h5> <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div> <div class="level1"><span class="xref">MemoryTranslatorCacheServiceCollectionExtensions</span></div> </div> <div class="inheritedMembers"> <h5>Inherited Members</h5> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a> </div> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a> </div> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a> </div> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a> </div> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a> </div> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a> </div> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a> </div> </div> <h6><strong>Namespace</strong>: <a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft">Microsoft</a>.<a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.extensions">Extensions</a>.<a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection">DependencyInjection</a></h6> <h6><strong>Assembly</strong>: Zaya.TranslatorCache.Impl.Memory.dll</h6> <h5 id="Microsoft_Extensions_DependencyInjection_MemoryTranslatorCacheServiceCollectionExtensions_syntax">Syntax</h5> <div class="codewrapper"> <pre><code class="lang-csharp hljs">public static class MemoryTranslatorCacheServiceCollectionExtensions</code></pre> </div> <h3 id="methods">Methods </h3> <span class="small pull-right mobile-hide"> <span class="divider">|</span> <a href="https://github.com/shtrasser-dev/Zaya.Translator/new/main/apiSpec/new?filename=Microsoft_Extensions_DependencyInjection_MemoryTranslatorCacheServiceCollectionExtensions_AddMemoryTranslatorCache_Microsoft_Extensions_DependencyInjection_IServiceCollection_.md&value=---%0Auid%3A%20Microsoft.Extensions.DependencyInjection.MemoryTranslatorCacheServiceCollectionExtensions.AddMemoryTranslatorCache(Microsoft.Extensions.DependencyInjection.IServiceCollection)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a> </span> <span class="small pull-right mobile-hide"> <a href="https://github.com/shtrasser-dev/Zaya.Translator/blob/main/src/Zaya.TranslatorCache.Impl.Memory/Extensions/ServiceCollectionExtensions.cs/#L14">View Source</a> </span> <a id="Microsoft_Extensions_DependencyInjection_MemoryTranslatorCacheServiceCollectionExtensions_AddMemoryTranslatorCache_" data-uid="Microsoft.Extensions.DependencyInjection.MemoryTranslatorCacheServiceCollectionExtensions.AddMemoryTranslatorCache*"></a> <h4 id="Microsoft_Extensions_DependencyInjection_MemoryTranslatorCacheServiceCollectionExtensions_AddMemoryTranslatorCache_Microsoft_Extensions_DependencyInjection_IServiceCollection_" data-uid="Microsoft.Extensions.DependencyInjection.MemoryTranslatorCacheServiceCollectionExtensions.AddMemoryTranslatorCache(Microsoft.Extensions.DependencyInjection.IServiceCollection)">AddMemoryTranslatorCache(IServiceCollection)</h4> <div class="markdown level1 summary"><p>Registers <a class="xref" href="Zaya.TranslatorCache.Impl.Memory.Services.MemoryTranslatorCacheService.html">MemoryTranslatorCacheService</a> as a singleton <a class="xref" href="Zaya.TranslatorCache.Services.ITranslatorCacheService.html">ITranslatorCacheService</a>.</p> </div> <div class="markdown level1 conceptual"></div> <h5 class="declaration">Declaration</h5> <div class="codewrapper"> <pre><code class="lang-csharp hljs">public static IServiceCollection AddMemoryTranslatorCache(this IServiceCollection services)</code></pre> </div> <h5 class="parameters">Parameters</h5> <table class="table table-bordered table-condensed"> <thead> <tr> <th>Type</th> <th>Name</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection">IServiceCollection</a></td> <td><span class="parametername">services</span></td> <td></td> </tr> </tbody> </table> <h5 class="returns">Returns</h5> <table class="table table-bordered table-condensed"> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection">IServiceCollection</a></td> <td></td> </tr> </tbody> </table> </article> </div> <div class="hidden-sm col-md-2" role="complementary"> <div class="sideaffix"> <div class="contribution"> <ul class="nav"> <li> <a href="https://github.com/shtrasser-dev/Zaya.Translator/new/main/apiSpec/new?filename=Microsoft_Extensions_DependencyInjection_MemoryTranslatorCacheServiceCollectionExtensions.md&value=---%0Auid%3A%20Microsoft.Extensions.DependencyInjection.MemoryTranslatorCacheServiceCollectionExtensions%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Edit this page</a> </li> <li> <a href="https://github.com/shtrasser-dev/Zaya.Translator/blob/main/src/Zaya.TranslatorCache.Impl.Memory/Extensions/ServiceCollectionExtensions.cs/#L9" class="contribution-link">View Source</a> </li> </ul> </div> <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix"> <h5>In this article</h5> <div></div> </nav> </div> </div> </div> </div> <footer> <div class="grad-bottom"></div> <div class="footer"> <div class="container"> <span class="pull-right"> <a href="#top">Back to top</a> </span> <span>Generated by <strong>DocFX</strong></span> </div> </div> </footer> </div> <script type="text/javascript" src="../styles/docfx.vendor.min.js"></script> <script type="text/javascript" src="../styles/docfx.js"></script> <script type="text/javascript" src="../styles/main.js"></script> </body> </html>