<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.socialstack.dev/index.php?action=history&amp;feed=atom&amp;title=Service_load_order</id>
	<title>Service load order - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.socialstack.dev/index.php?action=history&amp;feed=atom&amp;title=Service_load_order"/>
	<link rel="alternate" type="text/html" href="https://wiki.socialstack.dev/index.php?title=Service_load_order&amp;action=history"/>
	<updated>2026-10-16T04:01:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>https://wiki.socialstack.dev/index.php?title=Service_load_order&amp;diff=315&amp;oldid=prev</id>
		<title>Luke: Created page with &quot;Most of the time it doesn&#039;t matter which order services load in - it will be automatically established based on dependencies. Sometimes though it can be useful to give a guara...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.socialstack.dev/index.php?title=Service_load_order&amp;diff=315&amp;oldid=prev"/>
		<updated>2022-09-29T19:58:36Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Most of the time it doesn&amp;#039;t matter which order services load in - it will be automatically established based on dependencies. Sometimes though it can be useful to give a guara...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Most of the time it doesn&amp;#039;t matter which order services load in - it will be automatically established based on dependencies. Sometimes though it can be useful to give a guarantee that a service loads before other services. That can be done by setting the LoadPriority attribute on a service, like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using Api.Startup;&lt;br /&gt;
namespace Api.Things;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[LoadPriority(5)]&lt;br /&gt;
public partial class ThingService : AutoService&amp;lt;Thing&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a load priority is not specified &amp;#039;&amp;#039;&amp;#039;the default value is 10&amp;#039;&amp;#039;&amp;#039; just like with event listeners. The lower the number you give, the sooner it runs. LoadPriority(1) runs before LoadPriority(10).&lt;/div&gt;</summary>
		<author><name>Luke</name></author>
	</entry>
</feed>