generated from Nexus-Mods/NexusMods.App.Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from Nexus-Mods/rework-startup
Fix startup code
- Loading branch information
Showing
5 changed files
with
84 additions
and
27 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
src/NexusMods.MnemonicDB.Abstractions/Models/ModelDefinition.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
namespace NexusMods.MnemonicDB.Abstractions.Models; | ||
|
||
public class ModelDefinition | ||
{ | ||
/// <summary> | ||
/// Creates a new ModelDefinition, with the given name. | ||
/// </summary> | ||
public static ModelDefinition New(string name) | ||
{ | ||
return new ModelDefinition(); | ||
} | ||
|
||
public ModelDefinition Composes<TModel>() | ||
{ | ||
return this; | ||
} | ||
|
||
public ModelDefinition Composes<TModelA, TModelB>(string name) | ||
{ | ||
return this; | ||
} | ||
|
||
public ModelDefinition Composes<TModelA, TModelB, TModelC>(string name) | ||
{ | ||
return this; | ||
} | ||
|
||
public ModelDefinition Composes<TModelA, TModelB, TModelC, TModelD>(string name) | ||
{ | ||
return this; | ||
} | ||
|
||
public ModelDefinition Composes<TModelA, TModelB, TModelC, TModelD, TModelE>(string name) | ||
{ | ||
return this; | ||
} | ||
|
||
/// <summary> | ||
/// Defines a new attribute on the model of the given attribute type with the given parameters | ||
/// </summary> | ||
public ModelDefinition WithAttribute<TAttribute>(string name, bool isIndexed = false, bool noHistory = false) | ||
where TAttribute : IAttribute | ||
{ | ||
return this; | ||
} | ||
|
||
/// <summary> | ||
/// Defines a reference in another model that points to this class. These references will be exposed | ||
/// in the `name` property of this model. | ||
/// </summary> | ||
public ModelDefinition WithBackReference<TModel>(string name) | ||
{ | ||
return this; | ||
} | ||
|
||
public ModelDefinition Build() | ||
{ | ||
return this; | ||
} | ||
|
||
} |
9 changes: 0 additions & 9 deletions
9
src/NexusMods.MnemonicDB.Queryable/NexusMods.MnemonicDB.Queryable.csproj
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters