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.");
     }
 }
Esempio n. 2
0
 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.");
     }
 }
Esempio n. 3
0
 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.");
     }
 }
Esempio n. 4
0
 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)
 {
 }
Esempio n. 9
0
 public FieldString(FieldType Type, EntityBase Entity)
     : this(Type, null, Entity)
 {
 }
Esempio n. 10
0
 public FieldLookup(FieldType Type, EntityBase Entity)
     : this(Type, null, Entity)
 {
 }
Esempio n. 11
0
 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)
 {
 }
Esempio n. 13
0
 public FieldDecimal(FieldType Type, EntityBase Entity)
     : this(Type, null, Entity)
 {
 }
Esempio n. 14
0
 public FieldDecimal(FieldType Type)
     : this(Type, null, null)
 {
 }
 public FieldEntityReference(FieldType Type, EntityBase Entity)
     : this(Type, null, Entity)
 {
 }
Esempio n. 16
0
 public FieldString(FieldType Type)
     : this(Type, null, null)
 {
 }
Esempio n. 17
0
 public FieldLookup(FieldType Type)
     : this(Type, null, null)
 {
 }