コード例 #1
0
ファイル: FullSqlQuery.cs プロジェクト: MajidSafari/bltoolkit
        public FullSqlQuery(DbManager dbManager, bool ignoreLazyLoad = false, FactoryType factoryType = FactoryType.LazyLoading)
            : base(dbManager)
        {
            dbManager.MappingSchema = new FullMappingSchema(dbManager, ignoreLazyLoad, dbManager.MappingSchema, factoryType);

            _ignoreLazyLoad = ignoreLazyLoad;
        }
コード例 #2
0
 public FullMappingSchema(DbManager db, bool ignoreLazyLoad = false, MappingSchema parentMappingSchema = null, 
     FactoryType factoryType = FactoryType.LazyLoading)
 {
     _db = db;
     _parentMappingSchema = parentMappingSchema;
     _factoryType = factoryType;
     _ignoreLazyLoad = ignoreLazyLoad;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlatformJavaObjectFactoryProxy" /> class.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="factoryClassName">Name of the factory class.</param>
 /// <param name="payload">The payload.</param>
 /// <param name="properties">The properties.</param>
 protected PlatformJavaObjectFactoryProxy(FactoryType type, string factoryClassName, object payload, 
     IDictionary<string, object> properties)
 {
     _factoryType = type;
     _factoryClassName = factoryClassName;
     _payload = payload;
     _properties = properties;
 }
コード例 #4
0
        public CollectionFullObjectMapper(DbManager db, FactoryType factoryType)
        {
            _db = db;
            _factoryType = factoryType;

            PropertiesMapping = new List<IMapper>();
            PrimaryKeyValueGetters = new List<GetHandler>();
            PrimaryKeyNames = new List<string>();
        }
コード例 #5
0
        public FullObjectMapper(DbManager db, bool ignoreLazyLoading, FactoryType factoryType)
        {
            _db = db;
            _ignoreLazyLoad = ignoreLazyLoading;
            _factoryType = factoryType;

            PropertiesMapping = new List<IMapper>();
            PrimaryKeyValueGetters = new List<GetHandler>();
            PrimaryKeyNames = new List<string>();
        }
コード例 #6
0
 public static DAOFactory GetDAOFactory(FactoryType factoryType)
 {
     switch (factoryType)
     {
         case FactoryType.MySQL:
             return new MySQLDAOFactory();
         default:
             return null;
     }
 }
コード例 #7
0
ファイル: FactoryRunner.cs プロジェクト: dlmoody/netPatterns
 private AbstractPartFactory GetFactory(FactoryType type)
 {
     if(type == FactoryType.Car )
     {
         return new CarPartsFactory();
     }
     else
     {
         return new VanPartsFactory();
     }
 }
コード例 #8
0
ファイル: Factory.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>
        /// Default Constructor for a <see cref = "SharpDX.Direct2D1.Factory" />.
        /// </summary>
        public Factory(FactoryType factoryType, DebugLevel debugLevel)
            : base(IntPtr.Zero)
        {
            FactoryOptions? options = null;

            if (debugLevel != DebugLevel.None)
                options = new FactoryOptions() { DebugLevel = debugLevel };

            IntPtr temp;
            D2D1.CreateFactory(factoryType, Utilities.GetGuidFromType(GetType()), options, out temp);
            FromTemp(temp);
        }
コード例 #9
0
 public Unit(String _Classname, String _Image, String _Name, UnitType _Type, int _Price, int _BuildTime, int _Upgradelevel, FactoryType _Factory, String _Script, Side _Side)
 {
     Classname = _Classname;
     Image = _Image;
     Name = _Name;
     Type = _Type;
     Price = _Price;
     BuildTime = _BuildTime;
     UpgradeLevel = _Upgradelevel;
     Factory = _Factory;
     Script = _Script;
     Side = _Side;
 }
コード例 #10
0
        public IItemFactory GetFactory(FactoryType factoryType)
        {
            switch (factoryType)
            {
                case FactoryType.Hat:
                    return new HatFactory();
                case FactoryType.Chest:
                    return new ChestFactory();
                case FactoryType.Weapon:
                    return new WeaponFactory();
            }

            throw new ArgumentOutOfRangeException("factoryType");
        }
コード例 #11
0
ファイル: FactoryRunner.cs プロジェクト: dlmoody/netPatterns
        public void Run(FactoryType type)
        {
            AbstractPartFactory factory = GetFactory(type);

            IBody body = factory.CreateBody();
            IChassis chassis = factory.CreateChassis();
            IGlassware glass = factory.CreateGlassware();

            Console.WriteLine("-----------------------------");
            Console.WriteLine("body parts created: " + body.BodyParts);
            Console.WriteLine("chassis parts created: " + chassis.ChassisParts);
            Console.WriteLine("glassware parts created: " + glass.GlasswareParts);
            Console.WriteLine("-----------------------------");
        }
コード例 #12
0
ファイル: Factory.cs プロジェクト: khoatle/game
        public Factory(FactoryType factorytype, ParticleManagement particleManager, GraphicsDevice graphicsDevice)
            : base()
        {
            this.factoryType = factorytype;
            this.graphicsDevice = graphicsDevice;
            numTrashWaiting = 0;
            listTimeTrashProcessing = new List<double>();
            random = new Random();
            partId = -1; // Logic to Draw animated sprites depends on positive partID
            cycleTime = TimeSpan.FromMilliseconds(500.0);
            lastCycledTime = TimeSpan.Zero;
            currentTextureIndex = 0;
            currentFogColor = Vector3.One;

            // building construction state management
            underConstruction = true;
            constructionIndex = 0;
            lastConstructionSwitchTime = TimeSpan.Zero;
            constructionSwitchSpan = TimeSpan.FromSeconds(3);
            this.particleManager = particleManager;
            //buildingSoundInstance = PoseidonGame.audio.buildingSound.CreateInstance();

            //for animating trash processing
            switch (factoryType)
            {
                // These part id's were found out by experimentation. If we happen to change the model in future,
                // I'll need to find these part ids again. So, I have made them configurable from GameConstant
                case FactoryType.biodegradable:
                    partId = GameConstants.biofactoryPartId;
                    break;
                case FactoryType.radioactive:
                    partId = GameConstants.nuclearfactoryPartId;
                    break;
                case FactoryType.plastic:
                    partId = GameConstants.plasticfactoryPartId;
                    break;
            }
        }
コード例 #13
0
 public FactoryMethodAttribute(FactoryType registerAs)
 {
     RegisterAs = registerAs;
 }
コード例 #14
0
 public FactoryMethodAttribute(FactoryType registerAs, InstanceMode instanceMode)
 {
     RegisterAs   = registerAs;
     InstanceMode = instanceMode;
 }
コード例 #15
0
ファイル: Factory2.cs プロジェクト: zmtzawqlp/SharpDX
 /// <summary>
 /// Creates a new instance of the <see cref="Factory2"/> class with the specified <see cref="FactoryType"/>.
 /// </summary>
 /// <param name="factoryType">The factory threading type.</param>
 public Factory2(FactoryType factoryType)
     : base(factoryType)
 {
 }
コード例 #16
0
 public GameObject GetGameOjectResource(FactoryType factoryType, string resourcePath)
 {
     return(factoryManager.factoryDict[factoryType].GetItem(resourcePath));
 }
コード例 #17
0
ファイル: Factory1.cs プロジェクト: wyrover/SharpDX
 /// <summary>
 /// Default Constructor for a <see cref = "SharpDX.Direct2D1.Factory1" />.
 /// </summary>
 public Factory1(FactoryType factoryType)
     : this(factoryType, DebugLevel.None)
 {
 }
コード例 #18
0
 public GameObject GetGameObjectResource(FactoryType factoryType, string resourcePath)
 {
     return(mGameManager.GetGameObjectResource(factoryType, resourcePath));
 }
コード例 #19
0
 /// <summary>Creates info by supplying all the properties and chaining it with current (parent) info.</summary>
 public Request Push(
     Type serviceType, Type requiredServiceType, object serviceKey, string metadataKey, object metadata, IfUnresolved ifUnresolved,
     int factoryID, FactoryType factoryType, Type implementationType, int reuseLifespan) =>
 new Request(serviceType, requiredServiceType, serviceKey, metadataKey, metadata, ifUnresolved,
             factoryID, factoryType, implementationType, reuseLifespan, this);
コード例 #20
0
ファイル: Imports.cs プロジェクト: daxiang758/WInterop
 public static extern HResult DWriteCreateFactory(
     FactoryType factoryType,
     in Guid riid,
コード例 #21
0
 public void Print(FactoryType type)
 {
     _factory.Produce(type);
 }
コード例 #22
0
ファイル: Factory.cs プロジェクト: PlamenHP/StarWars
 public Factory(FactoryType type)
 {
     this.Name = name[(int)type];
 }
コード例 #23
0
 public FactoryBuilding(int x, int y, string faction) : base(x, y, 100, faction, '~')
 {
     type            = (FactoryType)GameEngine.random.Next(0, 2);
     productionSpeed = GameEngine.random.Next(3, 7);
 }
コード例 #24
0
 internal static DWRITE_FACTORY_TYPE Convert(FactoryType factoryType)
 {
 }
コード例 #25
0
 // 将游戏物体放回对象池的方法
 public void PushItem(FactoryType factoryType, string itemName, GameObject item)
 {
     mGameManager.PushItem(factoryType, itemName, item);
 }
コード例 #26
0
    /// <summary>
    /// Builds the factory.
    /// </summary>
    /// <returns>创建成功返回true,否则返回false</returns>
    /// <param name="buildType">Build type.</param>
    public bool BuildFactory(FactoryType buildType)
    {
        switch (buildType)
        {
        case FactoryType.FeedMill:
            //TODO Instantiate<Factory> Prefab
            Debug.Log("生成一个饲料厂");
            if (DBHandler.Instance.Coins < BuildingConfig.Instance.Container.factoryList["FeedMill"].Cost)
            {
                return(false);
            }
            FeedMill feedMillPrefab = Resources.Load <FeedMill>("");
            FeedMill feedMill       = Instantiate(feedMillPrefab);
            feedMill.Id = factoryDictionary.Count + 1;
            factoryDictionary.Add(factoryDictionary.Count + 1, feedMill);
            break;

        case FactoryType.MilkPlant:
            //TODO Instantiate<House> Prefab
            Debug.Log("生成一个乳品厂");
            if (DBHandler.Instance.Coins < BuildingConfig.Instance.Container.factoryList["MilkPlant"].Cost)
            {
                return(false);
            }
            MilkPlant milkPlantPrefab = Resources.Load <MilkPlant>("");
            MilkPlant milkPlant       = Instantiate(milkPlantPrefab);
            milkPlant.Id = factoryDictionary.Count + 1;
            factoryDictionary.Add(factoryDictionary.Count + 1, milkPlant);
            break;

        case FactoryType.SugarHouse:
            //TODO Instantiate<Store> Prefab
            Debug.Log("生成一个制糖厂");
            if (DBHandler.Instance.Coins < BuildingConfig.Instance.Container.factoryList["SugarHouse"].Cost)
            {
                return(false);
            }
            SugarHouse SugarHousePrefab = Resources.Load <SugarHouse>("");
            SugarHouse sugarHouse       = Instantiate(SugarHousePrefab);
            sugarHouse.Id = factoryDictionary.Count + 1;
            factoryDictionary.Add(factoryDictionary.Count + 1, sugarHouse);
            break;

        //case FactoryType.TextileMill:
        //    //TODO Instantiate<Store> Prefab
        //    Debug.Log("生成一个纺织厂");
        //    break;
        //case FactoryType.SnackFactory:
        //    //TODO Instantiate<Store> Prefab
        //    Debug.Log("生成一个零食厂");
        //    break;
        //case FactoryType.Deli:
        //    //TODO Instantiate<Store> Prefab
        //    Debug.Log("生成一个烘焙坊");
        //    break;
        //case FactoryType.Tailor:
        ////TODO Instantiate<Store> Prefab
        //Debug.Log("生成一个裁缝店");
        //break;
        default:
            return(false);
        }
        return(true);
    }
コード例 #27
0
ファイル: Message.cs プロジェクト: chigra1/AspnetRun
        public bool checkPattern(Packet.DataType type, string text)
        {
            IfType x = FactoryType.CreateType(type);

            return(x.checkStringPattern(text));
        }
コード例 #28
0
 public void PushGameObjectToFactory(FactoryType factoryType, string resourcePath, GameObject itemGo)
 {
     mGameManager.PushGameObjectToFactory(factoryType, resourcePath, itemGo);
 }
コード例 #29
0
ファイル: Message.cs プロジェクト: chigra1/AspnetRun
        public bool checkMinMax(Packet.DataType type, string input, string min, string max)
        {
            IfType x = FactoryType.CreateType(type);

            return(x.checkMinMax(input, min, max));
        }
コード例 #30
0
 /// <summary>
 /// Default Constructor for a <see cref = "SharpDX.Direct2D1.Factory" />.
 /// </summary>
 public Factory(FactoryType factoryType)
     : base(IntPtr.Zero)
 {
     DWrite.CreateFactory(factoryType, Utilities.GetGuidFromType(typeof(Factory)), this);
 }
コード例 #31
0
 public Factory[] GetRegisteredFactories(Type serviceType, object serviceKey, FactoryType factoryType)
 {
     throw new NotImplementedException();
 }
コード例 #32
0
ファイル: GameManager.cs プロジェクト: syy767854885/Alien
 //Boss
 public GameObject GetGameObjectResourceInstan(FactoryType factoryType, string resourcePath, Transform trans)
 {
     return factoryManager.factoryDict[factoryType].GetItemInstan(resourcePath, trans);
 }
コード例 #33
0
 //放回游戏物体 对象池
 public void PushGameObjectToFactory(FactoryType type, string itemName, GameObject item)
 {
     factoryManager.factoryDict[type].PushItem(itemName, item);
 }
コード例 #34
0
 public void PushGameObjectToFactory(FactoryType factoryType, string resourcePath, GameObject itemGo)
 {
     factoryManager.factoryDict[factoryType].PushItem(resourcePath, itemGo);
 }
コード例 #35
0
 public FactoryMethodAttribute(FactoryType registerAs)
 {
     RegisterAs = registerAs;
 }
コード例 #36
0
ファイル: Factory2.cs プロジェクト: zmtzawqlp/SharpDX
 /// <summary>
 /// Creates a new instance of the <see cref="Factory2"/> class with the specified <see cref="FactoryType"/> and <see cref="DebugLevel"/>.
 /// </summary>
 /// <param name="factoryType">The factory threading type.</param>
 /// <param name="debugLevel">The factory debug level.</param>
 public Factory2(FactoryType factoryType, DebugLevel debugLevel)
     : base(factoryType, debugLevel)
 {
 }
コード例 #37
0
 //获取游戏物体 对象池
 public GameObject GetGameObject(FactoryType type, string itemName)
 {
     return(factoryManager.factoryDict[type].GetItem(itemName));
 }
コード例 #38
0
 // 获取游戏物体的方法
 public GameObject GetItem(FactoryType factoryType, string itemName)
 {
     return(mGameManager.GetItem(factoryType, itemName));
 }
コード例 #39
0
ファイル: Factory2.cs プロジェクト: QuantumDeveloper/SharpDX
 /// <summary>
 /// Creates a new instance of the <see cref="Factory2"/> class with the specified <see cref="FactoryType"/> and <see cref="DebugLevel"/>.
 /// </summary>
 /// <param name="factoryType">The factory threading type.</param>
 /// <param name="debugLevel">The factory debug level.</param>
 public Factory2(FactoryType factoryType, DebugLevel debugLevel)
     : base(factoryType, debugLevel)
 {
 }
コード例 #40
0
ファイル: Factory.cs プロジェクト: alexey-bez/SharpDX
 /// <summary>
 /// Default Constructor for a <see cref = "SharpDX.Direct2D1.Factory" />.
 /// </summary>
 public Factory(FactoryType factoryType)
     : this(factoryType, DebugLevel.None)
 {
 }
コード例 #41
0
 public CFactoryTest(FactoryType type)
 {
     m_pFactory = FactoryFactory.CreateFactory(type);
 }
コード例 #42
0
 public void Unregister(Type serviceType, object serviceKey, FactoryType factoryType,
                        Func <Factory, bool> condition)
 {
     throw new NotImplementedException();
 }
コード例 #43
0
        private void CreateStation(FactoryType factoryType, string codename, int maxStack, LocalizedString name, LocalizedString desc, string guidString, Sprite icon, string variantname, RecipeCategory[] categories)
        {
            var category = GameResources.Instance.Items.FirstOrDefault(s => s.AssetId == productionStationGUID)?.Category;
            var item     = ScriptableObject.CreateInstance <ItemDefinition>();

            if (item == null)
            {
                Debug.Log("Item is null"); return;
            }
            if (category == null)
            {
                Debug.Log("Category is null"); return;
            }
            item.name     = codename;
            item.Category = category;
            item.MaxStack = maxStack;
            item.Icon     = icon;

            var prefabParent = new GameObject();
            var olditem      = GameResources.Instance.Items.FirstOrDefault(s => s.AssetId == productionStationGUID);

            prefabParent.SetActive(false);
            var newmodule = Instantiate(olditem.Prefabs[0], prefabParent.transform);
            var module    = newmodule.GetComponentInChildren <FactoryStation>();
            var producer  = newmodule.GetComponentInChildren <Producer>();

            newmodule.SetName("AlloyForgeStation");
            var gridmodule = newmodule.GetComponent <GridModule>();

            gridmodule.VariantName = variantname;
            gridmodule.Item        = item;

            var productionGroup = QuestingReferences.GetOrCreateTyping(factoryType);

            foreach (ProductionModule sleepersmodule in productionGroup.Modules)
            {
                using (StreamWriter writer = new StreamWriter(QuestingMod.path, true))
                {
                    writer.WriteLine("[Questing Update | Stations]: " + sleepersmodule.name);
                    writer.Dispose();
                }
            }

            LocalizedString nameStr = name;
            LocalizedString descStr = desc;

            Initialize(ref nameStr);
            Initialize(ref descStr);

            item.SetPrivateField("m_name", nameStr);
            item.SetPrivateField("m_description", descStr);
            typeof(FactoryStation).GetField("m_factoryType", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(module, factoryType);
            typeof(FactoryStation).GetField("m_productionGroup", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(module, productionGroup);
            typeof(Producer).GetField("m_categories", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(producer, categories);

            var guid = GUID.Parse(guidString);

            typeof(Definition).GetField("m_assetId", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).SetValue(item, guid);

            item.Prefabs = new GameObject[] { newmodule };

            AssetReference[] assets = new AssetReference[] { new AssetReference()
                                                             {
                                                                 Object = item, Guid = guid, Labels = new string[0]
                                                             } };
            RuntimeAssetStorage.Add(assets, default);
        }
コード例 #44
0
 //获取游戏物体资源
 public GameObject GetGameObjectResource(FactoryType factoryType, string name)
 {
     return(factoryManager.factoryDict[factoryType].GetItem(name));
 }
コード例 #45
0
 //回收游戏物体到对象池
 public void PushGameObjectToFactory(FactoryType factoryType, string name, GameObject go)
 {
     factoryManager.factoryDict[factoryType].PushItem(name, go);
 }
コード例 #46
0
 public FactoryMethodAttribute(FactoryType registerAs,InstanceMode instanceMode)
 {
     RegisterAs = registerAs;
     InstanceMode = instanceMode;
 }
コード例 #47
0
ファイル: Factory2.cs プロジェクト: QuantumDeveloper/SharpDX
 /// <summary>
 /// Creates a new instance of the <see cref="Factory2"/> class with the specified <see cref="FactoryType"/>.
 /// </summary>
 /// <param name="factoryType">The factory threading type.</param>
 public Factory2(FactoryType factoryType)
     : base(factoryType)
 {
 }
コード例 #48
0
ファイル: Factory1.cs プロジェクト: alexey-bez/SharpDX
 /// <summary>
 /// Creates a new instance of the <see cref="Factory1"/> class.
 /// </summary>
 /// <param name="factoryType">The factory type.</param>
 public Factory1(FactoryType factoryType)
     : base(IntPtr.Zero)
 {
     DWrite.CreateFactory(factoryType, Utilities.GetGuidFromType(typeof(Factory1)), this);
 }
コード例 #49
0
 /// <summary>
 /// Static constructor retrieves factory type from config.
 /// </summary>
 static OAuth2DataFactory()
 {
     factoryType = (FactoryType) OAuth2Config.OAuth2DataStoreType;
 }