public FieldLazyBinary(FieldType Type, FieldBase Base, EntityBase Entity, Db.IDbContext ctx = null) : base(Type, Base, Entity, ctx) { if (Type.DataType != DataType.Binary) { throw new ArgumentOutOfRangeException("Cannot create a binary field from a non-binary type."); } }
public FieldDecimal(FieldType Type, FieldBase Base, EntityBase Entity, Db.IDbContext ctx = null) : base(Type, Base, Entity, ctx) { if (Type.DataType != DataType.Decimal) { throw new ArgumentOutOfRangeException("Cannot create a decimal field from a non-decimal type."); } }
public FieldString(FieldType Type, FieldBase Base, EntityBase Entity, Db.IDbContext ctx = null) : base(Type, Base, Entity, ctx) { if (Type.DataType != DataType.Text) { throw new ArgumentOutOfRangeException("Cannot create a string field from a non-string type."); } }
public FieldLookup(FieldType Type, FieldBase Base, EntityBase Entity, Db.IDbContext ctx = null) : base(Type, Base, Entity, ctx) { if (Type.DataType != DataType.Lookup) { throw new ArgumentOutOfRangeException("Cannot create a lookup field from a non-lookup type."); } }
public FieldEntityReference(FieldType Type, FieldBase Base, EntityBase Entity, Db.IDbContext ctx = null) : base(Type, Base, Entity, ctx) { if (Type.DataType != DataType.EntityReference) { throw new ArgumentOutOfRangeException("Cannot create an entity reference field from a non-entity-reference type."); } }
public FieldEntityReference(FieldType Type) : this(Type, null, null) { }
public FieldLazyBinary(FieldType Type) : this(Type, null, null) { }
public FieldLazyBinary(FieldType Type, EntityBase Entity) : this(Type, null, Entity) { }
public FieldString(FieldType Type, EntityBase Entity) : this(Type, null, Entity) { }
public FieldLookup(FieldType Type, EntityBase Entity) : this(Type, null, Entity) { }
private static void RegisterType(FieldType Type) { try { RegistryLock.EnterWriteLock(); if (TypeRegistry.ContainsKey(Type.Value)) { throw new InvalidOperationException("Cannot register the same Field Type twice."); } TypeRegistry[Type.Value] = Type; } finally { try { RegistryLock.ExitWriteLock(); } catch (Exception e) { Log.Error("Hell froze over.", e); } } }
public FieldItemReference(FieldType Type) : this(Type, null, null) { }
public FieldDecimal(FieldType Type, EntityBase Entity) : this(Type, null, Entity) { }
public FieldDecimal(FieldType Type) : this(Type, null, null) { }
public FieldEntityReference(FieldType Type, EntityBase Entity) : this(Type, null, Entity) { }
public FieldString(FieldType Type) : this(Type, null, null) { }
public FieldLookup(FieldType Type) : this(Type, null, null) { }