public Construct(ConstructSymbol <T> .Simple symbol) { if (symbol == null) { throw AutoInitAttribute.ArgumentNullException(typeof(ConstructSymbol <T> .Simple), nameof(symbol)); } this.operationSymbol = symbol.Symbol; }
public static void RegisterTransformer(WordTransformerSymbol transformerSymbol, Action <WordContext, OpenXmlPackage> transformer) { if (transformerSymbol == null) { throw AutoInitAttribute.ArgumentNullException(typeof(WordTransformerSymbol), nameof(transformerSymbol)); } Transformers.Add(transformerSymbol, transformer); }
public ConstructFromMany(ConstructSymbol <T> .FromMany <F> symbol) { if (symbol == null) { throw AutoInitAttribute.ArgumentNullException(typeof(ConstructSymbol <T> .FromMany <F>), nameof(symbol)); } this.Symbol = symbol; }
public ConstructFrom(ConstructSymbol <T> .From <F> symbol) { if (symbol == null) { throw AutoInitAttribute.ArgumentNullException(typeof(ConstructSymbol <T> .From <F>), nameof(symbol)); } this.operationSymbol = symbol.Symbol; this.baseType = symbol.BaseType; }
public Delete(DeleteSymbol <T> symbol) { if (symbol == null) { throw AutoInitAttribute.ArgumentNullException(typeof(DeleteSymbol <T>), nameof(symbol)); } this.Symbol = symbol; this.Lite = true; }
public static void RegisterPermissions(params PermissionSymbol[] permissions) { foreach (var p in permissions) { if (p == null) { throw AutoInitAttribute.ArgumentNullException(typeof(PermissionSymbol), nameof(permissions)); } PermissionAuthLogic.permissions.Add(p); } }
public static void Register(FileTypeSymbol fileTypeSymbol, IFileTypeAlgorithm algorithm) { if (fileTypeSymbol == null) { throw AutoInitAttribute.ArgumentNullException(typeof(FileTypeSymbol), nameof(fileTypeSymbol)); } if (algorithm == null) { throw new ArgumentNullException(nameof(algorithm)); } FileTypes.Add(fileTypeSymbol, algorithm); }
public static void Register(ProcessAlgorithmSymbol processAlgorithm, IProcessAlgorithm algorithm) { if (processAlgorithm == null) { throw AutoInitAttribute.ArgumentNullException(typeof(ProcessAlgorithmSymbol), nameof(processAlgorithm)); } if (algorithm == null) { throw new ArgumentNullException(nameof(algorithm)); } registeredProcesses.Add(processAlgorithm, algorithm); }
public static void Register(SimpleTaskSymbol simpleTaskSymbol, Func <ScheduledTaskContext, Lite <IEntity> > action) { if (simpleTaskSymbol == null) { throw AutoInitAttribute.ArgumentNullException(typeof(SimpleTaskSymbol), nameof(simpleTaskSymbol)); } if (action == null) { throw new ArgumentNullException(nameof(action)); } tasks.Add(simpleTaskSymbol, action); }
public static void Register <T>(TypeConditionSymbol typeCondition, Expression <Func <T, bool> > condition, Func <T, bool>?inMemoryCondition) where T : Entity { if (typeCondition == null) { throw AutoInitAttribute.ArgumentNullException(typeof(TypeConditionSymbol), nameof(typeCondition)); } if (condition == null) { throw new ArgumentNullException(nameof(condition)); } infos.GetOrCreate(typeof(T))[typeCondition] = new TypeConditionPair(condition, inMemoryCondition); }
public static void RegisterTypes(params Type[] types) { foreach (var t in types) { if (!t.IsStaticClass()) { throw new ArgumentException("{0} is not a static class".FormatWith(t.Name)); } foreach (var p in t.GetFields(BindingFlags.Public | BindingFlags.Static).Select(fi => fi.GetValue(null)).Cast <PermissionSymbol>()) { if (p == null) { throw AutoInitAttribute.ArgumentNullException(typeof(PermissionSymbol), nameof(permissions)); } PermissionAuthLogic.permissions.Add(p); } } }
public static void Register <T>(TypeConditionSymbol typeCondition, Expression <Func <T, bool> > condition, Func <T, bool>?inMemoryCondition) where T : Entity { if (Schema.Current.IsCompleted) { throw new InvalidOperationException("Schema already completed"); } if (typeCondition == null) { throw AutoInitAttribute.ArgumentNullException(typeof(TypeConditionSymbol), nameof(typeCondition)); } if (condition == null) { throw new ArgumentNullException(nameof(condition)); } infos.GetOrCreate(typeof(T))[typeCondition] = new TypeConditionPair(condition, inMemoryCondition); }
public Delete(DeleteSymbol <T> symbol) { this.Symbol = symbol ?? throw AutoInitAttribute.ArgumentNullException(typeof(DeleteSymbol <T>), nameof(symbol)); }
public Execute(ExecuteSymbol <T> symbol) { this.Symbol = symbol ?? throw AutoInitAttribute.ArgumentNullException(typeof(ExecuteSymbol <T>), nameof(symbol)); this.Lite = true; }