예제 #1
0
        /// <summary>Initializes the <see cref="EntityFactoryFactory"/> class.</summary>
        static EntityFactoryFactory()
        {
            Array entityTypeValues = Enum.GetValues(typeof(SD.LLBLGen.Pro.Examples.Authorization.EntityType));

            foreach (int entityTypeValue in entityTypeValues)
            {
                IEntity2 dummy = GeneralEntityFactory.Create((SD.LLBLGen.Pro.Examples.Authorization.EntityType)entityTypeValue);
                _factoryPerType.Add(dummy.GetType(), dummy.GetEntityFactory());
            }
        }
예제 #2
0
        /// <summary>Initializes the <see cref="EntityFactoryFactory"/> class.</summary>
        static EntityFactoryFactory()
        {
            Array entityTypeValues = Enum.GetValues(typeof(Northwind.EntityType));

            foreach (int entityTypeValue in entityTypeValues)
            {
                IEntity2 dummy = GeneralEntityFactory.Create((Northwind.EntityType)entityTypeValue);
                _factoryPerType.Add(dummy.GetType(), dummy.GetEntityFactory());
            }
        }
        /// <summary>Initializes the <see cref="EntityFactoryFactory"/> class.</summary>
        static EntityFactoryFactory()
        {
            Array entityTypeValues = Enum.GetValues(typeof(BlazorTests.Server.Entities.EntityType));

            foreach (int entityTypeValue in entityTypeValues)
            {
                IEntity2 dummy = GeneralEntityFactory.Create((BlazorTests.Server.Entities.EntityType)entityTypeValue);
                _factoryPerType.Add(dummy.GetType(), dummy.GetEntityFactory());
            }
        }
예제 #4
0
        /// <summary>Initializes the <see cref="EntityFactoryFactory"/> class.</summary>
        static EntityFactoryFactory()
        {
            Array entityTypeValues = Enum.GetValues(typeof(NinjaSoftware.EnioNg.CoolJ.EntityType));

            foreach (int entityTypeValue in entityTypeValues)
            {
                IEntity2 dummy = GeneralEntityFactory.Create((NinjaSoftware.EnioNg.CoolJ.EntityType)entityTypeValue);
                _factoryPerType.Add(dummy.GetType(), dummy.GetEntityFactory());
            }
        }
예제 #5
0
 private void VerifyEntity(IEntity2 itemEntity)
 {
     if (itemEntity == null)
     {
         throw new ArgumentNullException("itemEntity", "A non-null GiftCertificateOrderItemEntity is required.");
     }
     if (itemEntity.GetType() != typeof(GiftCertificateOrderItemEntity))
     {
         throw new ArgumentException(string.Format("Given entity must be a GiftCertificateOrderItemEntity ({0} given).", itemEntity.GetType()));
     }
 }
예제 #6
0
 public long GetOrderItemId(IEntity2 itemEntity)
 {
     if (itemEntity == null)
     {
         throw new ArgumentNullException("itemEntity", "A non-null EventTestOrderItemEntity is required.");
     }
     if (itemEntity.GetType() != typeof(EventTestOrderItemEntity))
     {
         throw new ArgumentException(string.Format("Given entity must be a EventTestOrderItemEntity ({0} given).", itemEntity.GetType()));
     }
     return(((EventTestOrderItemEntity)itemEntity).OrderItemId);
 }