This file contains hidden or 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
public interface INamedEntity | |
{ | |
string Id { get; set; } | |
string Name { get; set; } | |
} | |
public class DenormalizedReference<T> where T : INamedEntity | |
{ | |
public string Id { get; set; } | |
public string Name { get; set; } | |
public static implicit operator DenormalizedReference<T>(T doc) { |
This file contains hidden or 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
[Test] | |
public void PluginTest() { | |
using (IContainer container = new Container()) { | |
container.Configure(x => { | |
x.Scan(y => { | |
y.TheCallingAssembly(); | |
y.Convention<PluginFamilyScanner>(); | |
}); | |
}); | |
container.AssertConfigurationIsValid(); |
This file contains hidden or 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
public class MergeVarFieldValues : MergeVar, IDictionary<string, object> | |
{ | |
private IDictionary<string, object> _local = new Dictionary<string, object>(StringComparer.CurrentCultureIgnoreCase); | |
public void Add(string key, object value) { | |
_local.Add(key, value); | |
} | |
public bool ContainsKey(string key) { |
This file contains hidden or 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
public class UserAuth{ | |
... | |
public long UserID {get;set;} | |
} | |
User user = new User(); | |
user.UserID = 100; | |
session.Store(user); | |
session.SaveChanges(); |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Globalization; | |
using System.Linq; | |
using System.Xml.Linq; | |
using Microsoft.AspNetCore.DataProtection.KeyManagement; | |
using Microsoft.AspNetCore.DataProtection.Repositories; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Options; |