About 52 results
Open links in new tab
  1. EditorConfig control File-scoped namespace declaration

    Oct 7, 2021 · I'm using C# 10 new feature File-scoped namespace declaration. I have old code like this namespace SampleCode { public class MyClass { } } I'm moving this code to namespace SampleCode;

  2. What is the current state of the "scoped" attribute for the style ...

    Feb 20, 2015 · If the scoped attribute is present: where flow content is expected, but before any other flow content other than inter-element whitespace, and not as the child of an element whose content …

  3. Quais são as diferenças entre os métodos AddTransient, AddScoped e ...

    Sep 19, 2021 · Conforme o exemplo acima, gostaria de ter minhas dúvidas esclarecidas. Como cada um desses métodos impacta no ciclo de vida da aplicação ou requisição em relação ao serviço …

  4. VS 2022 - Convert to file-scoped namespace in all files

    Nov 8, 2021 · After you have configured the .editorconfig, you can configure a 'Code Cleanup' setting to automatically convert all files to use file-scoped namespace. Go to Tools -> Options -> Text Editor -> …

  5. AddTransient, AddScoped and AddSingleton Services Differences

    Jul 1, 2016 · Scoped: In scoped, the same object instance will be injected in a single request and response. Singleton: In singleton, the same object will be injected across all requests and responses. …

  6. When to use following Transient, scoped and singleton

    Apr 22, 2021 · Scoped: For example you are playing game in which number of life is 5 and then you need to decrease the number when player's game over. And in every new time you need new …

  7. Cannot consume scoped service IMongoDbContext from singleton ...

    Aug 22, 2017 · Scoped services are created from an IServiceScope. One of its most important purposes is to ensure that any IDisposable services which are created in that scope are properly disposed …

  8. How to consume a Scoped service from a Singleton?

    This also allows you to register custom services as scoped dependencies should you want to move logic out of the hosted service and use the hosted service only to trigger some work (e.g. regularly trigger …

  9. I am trying to use Snowflake function BUILD_SCOPED_FILE_URL …

    Aug 8, 2022 · I am trying to use the function BUILD_SCOPED_FILE_URL on unstructured data (excel sheets). I have uploaded these sheets on Snowflake internal stage and have made use of the Put …

  10. c++ - std::lock_guard or std::scoped_lock? - Stack Overflow

    Mar 25, 2017 · The scoped_lock is a strictly superior version of lock_guard that locks an arbitrary number of mutexes all at once (using the same deadlock-avoidance algorithm as std::lock).