public FullSqlQuery(DbManager dbManager, bool ignoreLazyLoad = false, FactoryType factoryType = FactoryType.LazyLoading) : base(dbManager) { dbManager.MappingSchema = new FullMappingSchema(dbManager, ignoreLazyLoad, dbManager.MappingSchema, factoryType); _ignoreLazyLoad = ignoreLazyLoad; }
public FullMappingSchema(DbManager db, bool ignoreLazyLoad = false, MappingSchema parentMappingSchema = null, FactoryType factoryType = FactoryType.LazyLoading) { _db = db; _parentMappingSchema = parentMappingSchema; _factoryType = factoryType; _ignoreLazyLoad = ignoreLazyLoad; }
/// <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; }
public CollectionFullObjectMapper(DbManager db, FactoryType factoryType) { _db = db; _factoryType = factoryType; PropertiesMapping = new List<IMapper>(); PrimaryKeyValueGetters = new List<GetHandler>(); PrimaryKeyNames = new List<string>(); }
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>(); }
public static DAOFactory GetDAOFactory(FactoryType factoryType) { switch (factoryType) { case FactoryType.MySQL: return new MySQLDAOFactory(); default: return null; } }
private AbstractPartFactory GetFactory(FactoryType type) { if(type == FactoryType.Car ) { return new CarPartsFactory(); } else { return new VanPartsFactory(); } }
/// <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); }
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; }
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"); }
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("-----------------------------"); }
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; } }
public FactoryMethodAttribute(FactoryType registerAs) { RegisterAs = registerAs; }
public FactoryMethodAttribute(FactoryType registerAs, InstanceMode instanceMode) { RegisterAs = registerAs; InstanceMode = instanceMode; }
/// <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) { }
public GameObject GetGameOjectResource(FactoryType factoryType, string resourcePath) { return(factoryManager.factoryDict[factoryType].GetItem(resourcePath)); }
/// <summary> /// Default Constructor for a <see cref = "SharpDX.Direct2D1.Factory1" />. /// </summary> public Factory1(FactoryType factoryType) : this(factoryType, DebugLevel.None) { }
public GameObject GetGameObjectResource(FactoryType factoryType, string resourcePath) { return(mGameManager.GetGameObjectResource(factoryType, resourcePath)); }
/// <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);
public static extern HResult DWriteCreateFactory( FactoryType factoryType, in Guid riid,
public void Print(FactoryType type) { _factory.Produce(type); }
public Factory(FactoryType type) { this.Name = name[(int)type]; }
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); }
internal static DWRITE_FACTORY_TYPE Convert(FactoryType factoryType) { }
// 将游戏物体放回对象池的方法 public void PushItem(FactoryType factoryType, string itemName, GameObject item) { mGameManager.PushItem(factoryType, itemName, item); }
/// <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); }
public bool checkPattern(Packet.DataType type, string text) { IfType x = FactoryType.CreateType(type); return(x.checkStringPattern(text)); }
public void PushGameObjectToFactory(FactoryType factoryType, string resourcePath, GameObject itemGo) { mGameManager.PushGameObjectToFactory(factoryType, resourcePath, itemGo); }
public bool checkMinMax(Packet.DataType type, string input, string min, string max) { IfType x = FactoryType.CreateType(type); return(x.checkMinMax(input, min, max)); }
/// <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); }
public Factory[] GetRegisteredFactories(Type serviceType, object serviceKey, FactoryType factoryType) { throw new NotImplementedException(); }
//Boss public GameObject GetGameObjectResourceInstan(FactoryType factoryType, string resourcePath, Transform trans) { return factoryManager.factoryDict[factoryType].GetItemInstan(resourcePath, trans); }
//放回游戏物体 对象池 public void PushGameObjectToFactory(FactoryType type, string itemName, GameObject item) { factoryManager.factoryDict[type].PushItem(itemName, item); }
public void PushGameObjectToFactory(FactoryType factoryType, string resourcePath, GameObject itemGo) { factoryManager.factoryDict[factoryType].PushItem(resourcePath, itemGo); }
/// <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) { }
//获取游戏物体 对象池 public GameObject GetGameObject(FactoryType type, string itemName) { return(factoryManager.factoryDict[type].GetItem(itemName)); }
// 获取游戏物体的方法 public GameObject GetItem(FactoryType factoryType, string itemName) { return(mGameManager.GetItem(factoryType, itemName)); }
/// <summary> /// Default Constructor for a <see cref = "SharpDX.Direct2D1.Factory" />. /// </summary> public Factory(FactoryType factoryType) : this(factoryType, DebugLevel.None) { }
public CFactoryTest(FactoryType type) { m_pFactory = FactoryFactory.CreateFactory(type); }
public void Unregister(Type serviceType, object serviceKey, FactoryType factoryType, Func <Factory, bool> condition) { throw new NotImplementedException(); }
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); }
//获取游戏物体资源 public GameObject GetGameObjectResource(FactoryType factoryType, string name) { return(factoryManager.factoryDict[factoryType].GetItem(name)); }
//回收游戏物体到对象池 public void PushGameObjectToFactory(FactoryType factoryType, string name, GameObject go) { factoryManager.factoryDict[factoryType].PushItem(name, go); }
public FactoryMethodAttribute(FactoryType registerAs,InstanceMode instanceMode) { RegisterAs = registerAs; InstanceMode = instanceMode; }
/// <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); }
/// <summary> /// Static constructor retrieves factory type from config. /// </summary> static OAuth2DataFactory() { factoryType = (FactoryType) OAuth2Config.OAuth2DataStoreType; }